1- // AA Copyright 2019-2020 CERN and copyright holders of ALICE O2.A
2- // See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3- // All rights not expressly granted are reserved.
1+ // AA Copyright 2019-2020 CERN and copyright holders of ALICE O2.A
2+ // See https://alice-o2.web.cern.ch/copyright for details of the copyright holders.
3+ // All rights not expressly granted are reserved.
44//
5- // This software is distributed under the terms of the GNU General Public
6- // License v3 (GPL Version 3), copied verbatim in the file "COPYING".
5+ // This software is distributed under the terms of the GNU General Public
6+ // License v3 (GPL Version 3), copied verbatim in the file "COPYING".
77//
8- // In applying this license CERN does not waive the privileges and immunities
9- // granted to it by virtue of its status as an Intergovernmental Organization
10- // or submit itself to any jurisdiction.
8+ // In applying this license CERN does not waive the privileges and immunities
9+ // granted to it by virtue of its status as an Intergovernmental Organization
10+ // or submit itself to any jurisdiction.
1111
1212// / @file NoiseCalibratorSpec.cxx
1313
@@ -49,7 +49,7 @@ void NoiseCalibratorSpec::init(InitContext& ic)
4949 mStopMeOnly = ic.options ().get <bool >(" stop-me-only" );
5050 mPath = ic.options ().get <std::string>(" path-CCDB" );
5151 mPathMerge = ic.options ().get <std::string>(" path-CCDB-merge" );
52-
52+
5353 mMeta = ic.options ().get <std::string>(" meta" );
5454 mStart = ic.options ().get <int64_t >(" tstart" );
5555 mEnd = ic.options ().get <int64_t >(" tend" );
@@ -75,7 +75,7 @@ void NoiseCalibratorSpec::run(ProcessingContext& pc)
7575 if (mOutputType .compare (" CCDB" ) == 0 ) {
7676 LOG (info) << " Sending an object to Production-CCDB" ;
7777 sendOutputCcdb (pc.outputs ());
78- LOG (info) << " Sending an object to Production-CCDBMerge" ;
78+ LOG (info) << " Sending an object to Production-CCDBMerge" ;
7979 sendOutputCcdbMerge (pc.outputs ());
8080 } else if (mOutputType .compare (" DCS" ) == 0 ) {
8181 LOG (info) << " Sending an object to DCS-CCDB" ;
@@ -97,7 +97,7 @@ void NoiseCalibratorSpec::run(ProcessingContext& pc)
9797 if (mOutputType .compare (" CCDB" ) == 0 ) {
9898 LOG (info) << " Sending an object to Production-CCDB" ;
9999 sendOutputCcdb (pc.outputs ());
100- LOG (info) << " Sending an object to Production-CCDBMerge" ;
100+ LOG (info) << " Sending an object to Production-CCDBMerge" ;
101101 sendOutputCcdbMerge (pc.outputs ());
102102 } else if (mOutputType .compare (" DCS" ) == 0 ) {
103103 LOG (info) << " Sending an object to DCS-CCDB" ;
@@ -168,7 +168,7 @@ void NoiseCalibratorSpec::sendOutputCcdbDcs(DataAllocator& output)
168168
169169 const auto & payload = mCalibrator ->getNoiseMap ();
170170 // const auto& payload = mCalibrator->getNoiseMap(starTF, endTF); //For TimeSlot calibration
171-
171+
172172 o2::ccdb::CcdbObjectInfo info (mPath , " NoiseMap" , " noise.root" , meta, tstart, tend);
173173 auto flName = o2::ccdb::CcdbApi::generateFileName (" noise" );
174174 auto image = o2::ccdb::CcdbApi::createObjectImage (&payload, &info);
@@ -182,7 +182,6 @@ void NoiseCalibratorSpec::sendOutputCcdbDcs(DataAllocator& output)
182182 output.snapshot (Output{clbUtils::gDataOriginCDBPayload , " MFT_NoiseMap" , 0 }, *image.get ());
183183 output.snapshot (Output{clbUtils::gDataOriginCDBWrapper , " MFT_NoiseMap" , 0 }, info);
184184
185-
186185 setOutputDcs (payload);
187186
188187 o2::ccdb::CcdbObjectInfo infoDcs (mPathDcs , " NoiseMap" , " noise.root" , meta, tstart, tend);
@@ -298,13 +297,13 @@ void NoiseCalibratorSpec::sendOutputCcdbMerge(DataAllocator& output)
298297 // const auto& payload = mCalibrator->getNoiseMap(starTF, endTF); //For TimeSlot calibration
299298 map<string, string> headers;
300299 map<std::string, std::string> filter;
301- auto * payloadPrev1 = api.retrieveFromTFileAny <o2::itsmft::NoiseMap>(mPath , filter,-1 , &headers);
300+ auto * payloadPrev1 = api.retrieveFromTFileAny <o2::itsmft::NoiseMap>(mPath , filter, -1 , &headers);
302301 long validtime = std::stol (headers[" Valid-From" ]);
303- validtime= validtime- 60 ;
304- auto * payloadPrev2 = api.retrieveFromTFileAny <o2::itsmft::NoiseMap>(mPath , filter,validtime, &headers);
305- auto bufferPL= payloadPrev2->merge (payloadPrev1);
306- auto mergedPL= payload.merge (&bufferPL);
307- // payload.merge(payloadPrev);
302+ validtime = validtime - 60 ;
303+ auto * payloadPrev2 = api.retrieveFromTFileAny <o2::itsmft::NoiseMap>(mPath , filter, validtime, &headers);
304+ auto bufferPL = payloadPrev2->merge (payloadPrev1);
305+ auto mergedPL = payload.merge (&bufferPL);
306+ // payload.merge(payloadPrev);
308307 o2::ccdb::CcdbObjectInfo info (mPathMerge , " NoiseMap" , " noise.root" , meta, tstart, tend);
309308 auto flName = o2::ccdb::CcdbApi::generateFileName (" noise" );
310309 auto image = o2::ccdb::CcdbApi::createObjectImage (&mergedPL, &info);
@@ -360,7 +359,7 @@ void NoiseCalibratorSpec::sendOutputDcs(DataAllocator& output)
360359
361360 const auto & payload = mCalibrator ->getNoiseMap ();
362361 // const auto& payload = mCalibrator->getNoiseMap(starTF, endTF); //For TimeSlot calibration
363-
362+
364363 setOutputDcs (payload);
365364
366365 o2::ccdb::CcdbObjectInfo infoDcs (mPathDcs , " NoiseMap" , " noise.root" , meta, tstart, tend);
0 commit comments