File tree Expand file tree Collapse file tree 2 files changed +18
-6
lines changed
Expand file tree Collapse file tree 2 files changed +18
-6
lines changed Original file line number Diff line number Diff line change @@ -57,6 +57,9 @@ class CTFCoderBase
5757
5858 virtual void createCoders (const std::vector<char >& bufVec, o2::ctf::CTFCoderBase::OpType op) = 0;
5959
60+ // detector coder need to redefine this method if uses no default version, see comment in the cxx file
61+ virtual void assignDictVersion (CTFDictHeader& h) const ;
62+
6063 template <typename CTF>
6164 std::vector<char > readDictionaryFromFile (const std::string& dictPath, bool mayFail = false );
6265
@@ -112,12 +115,6 @@ class CTFCoderBase
112115
113116 protected:
114117 std::string getPrefix () const { return o2::utils::Str::concat_string (mDet .getName (), " _CTF: " ); }
115- void assignDictVersion (CTFDictHeader& h) const
116- {
117- if (mExtHeader .isValidDictTimeStamp ()) {
118- h = mExtHeader ;
119- }
120- }
121118
122119 void checkDictVersion (const CTFDictHeader& h) const ;
123120
Original file line number Diff line number Diff line change @@ -30,6 +30,21 @@ void CTFCoderBase::checkDictVersion(const CTFDictHeader& h) const
3030 }
3131}
3232
33+ // Assign version of the dictionary which will be stored in the data (including dictionary data during dictionary creation)
34+ // In case detector CTFCoder uses non-defaul dict. version, it should redefine this method in order to assign the version
35+ // it needs ONLY when the external dictionary is not provided
36+ void CTFCoderBase::assignDictVersion (CTFDictHeader& h) const
37+ {
38+ if (mExtHeader .isValidDictTimeStamp ()) {
39+ h = mExtHeader ;
40+ }
41+ // detector code may exten it by
42+ // else {
43+ // h.majorVersion = <A>;
44+ // h.minorVersion = <B>;
45+ // }
46+ }
47+
3348void CTFCoderBase::updateTimeDependentParams (ProcessingContext& pc)
3449{
3550 if (mLoadDictFromCCDB ) {
You can’t perform that action at this time.
0 commit comments