@@ -78,16 +78,6 @@ void ITSTrackTask::initialize(o2::framework::InitContext& /*ctx*/)
7878 auto line = new TLine (ChipBoundary[l], 0 , ChipBoundary[l], 10 );
7979 hNClusterVsChipITS->GetListOfFunctions ()->Add (line);
8080 }
81-
82- // get dict from ccdb
83- // mTimestamp = std::stol(mCustomParameters["dicttimestamp"]);
84- mTimestamp = std::stol (o2::quality_control_modules::common::getFromConfig<string>(mCustomParameters , " dicttimestamp" , " 0" ));
85- long int ts = mTimestamp ? mTimestamp : o2::ccdb::getCurrentTimestamp ();
86- ILOG (Info, Support) << " Getting dictionary from ccdb - timestamp: " << ts << ENDM;
87- auto & mgr = o2::ccdb::BasicCCDBManager::instance ();
88- mgr.setTimestamp (ts);
89- mDict = mgr.get <o2::itsmft::TopologyDictionary>(" ITS/Calib/ClusterDictionary" );
90- ILOG (Info, Support) << " Dictionary size: " << mDict ->getSize () << ENDM;
9181}
9282
9383void ITSTrackTask::startOfActivity (Activity& /* activity*/ )
@@ -104,6 +94,17 @@ void ITSTrackTask::monitorData(o2::framework::ProcessingContext& ctx)
10494{
10595
10696 ILOG (Info, Support) << " START DOING QC General" << ENDM;
97+
98+ if (mTimestamp == -1 ) { // get dict from ccdb
99+ mTimestamp = std::stol (o2::quality_control_modules::common::getFromConfig<string>(mCustomParameters , " dicttimestamp" , " 0" ));
100+ long int ts = mTimestamp ? mTimestamp : ctx.services ().get <o2::framework::TimingInfo>().creation ;
101+ ILOG (Info, Support) << " Getting dictionary from ccdb - timestamp: " << ts << ENDM;
102+ auto & mgr = o2::ccdb::BasicCCDBManager::instance ();
103+ mgr.setTimestamp (ts);
104+ mDict = mgr.get <o2::itsmft::TopologyDictionary>(" ITS/Calib/ClusterDictionary" );
105+ ILOG (Info, Support) << " Dictionary size: " << mDict ->getSize () << ENDM;
106+ }
107+
107108 auto trackArr = ctx.inputs ().get <gsl::span<o2::its::TrackITS>>(" tracks" );
108109 auto trackRofArr = ctx.inputs ().get <gsl::span<o2::itsmft::ROFRecord>>(" rofs" );
109110 auto clusRofArr = ctx.inputs ().get <gsl::span<o2::itsmft::ROFRecord>>(" clustersrof" );
0 commit comments