Skip to content

Commit b83dbda

Browse files
Fixed O2liter errors, resolve merge conflict
1 parent e3d22b5 commit b83dbda

File tree

1 file changed

+1
-50
lines changed

1 file changed

+1
-50
lines changed

PWGDQ/Tasks/tableReader_withAssoc_direct.cxx

Lines changed: 1 addition & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -60,19 +60,17 @@
6060

6161
#include <RtypesCore.h>
6262

63+
#include <algorithm>
6364
#include <chrono>
6465
#include <cstdint>
6566
#include <cstdlib>
66-
#include <iostream>
6767
#include <iterator>
6868
#include <map>
6969
#include <memory>
7070
#include <string>
7171
#include <utility>
7272
#include <vector>
7373

74-
using std::cout;
75-
using std::endl;
7674
using std::string;
7775

7876
using namespace o2;
@@ -248,14 +246,6 @@ constexpr static uint32_t gkMuonFillMapWithCov = VarManager::ObjTypes::Muon | Va
248246
// Global function used to define needed histogram classes
249247
void DefineHistograms(HistogramManager* histMan, TString histClasses, const char* histGroups); // defines histograms for all tasks
250248

251-
template <typename TMap>
252-
void PrintBitMap(TMap map, int nbits)
253-
{
254-
for (int i = 0; i < nbits; i++) {
255-
cout << ((map & (TMap(1) << i)) > 0 ? "1" : "0");
256-
}
257-
}
258-
259249
// Enum containing the ordering of statistics histograms to be written in the QA file
260250
enum ZorroStatHist {
261251
kStatsZorroInfo = 0,
@@ -338,7 +328,6 @@ struct AnalysisEventSelection {
338328

339329
void init(o2::framework::InitContext& context)
340330
{
341-
cout << "AnalysisEventSelection::init() called" << endl;
342331
if (context.mOptions.get<bool>("processDummy")) {
343332
return;
344333
}
@@ -418,13 +407,11 @@ struct AnalysisEventSelection {
418407
rctChecker.init(fConfigRCT.fConfigRCTLabel, fConfigRCT.fCheckZDC.value);
419408
}
420409

421-
cout << "AnalysisEventSelection::init() completed" << endl;
422410
}
423411

424412
template <uint32_t TEventFillMap, typename TEvents>
425413
void runEventSelection(TEvents const& events, BCsWithTimestamps const& bcs)
426414
{
427-
cout << "AnalysisEventSelection::runEventSelection() called with " << events.size() << " events and " << bcs.size() << " BCs" << endl;
428415

429416
if (bcs.size() > 0 && fCurrentRun != bcs.begin().runNumber()) {
430417
if (fConfigPostCalibTPC.fConfigComputeTPCpostCalib) {
@@ -477,7 +464,6 @@ struct AnalysisEventSelection {
477464
fCurrentRun = bcs.begin().runNumber();
478465
} // end updating the CCDB quantities at change of run
479466

480-
cout << "Filling TimeFrame statistics histograms" << endl;
481467
VarManager::ResetValues(0, VarManager::kNEventWiseVariables);
482468
VarManager::FillTimeFrame(bcs);
483469
VarManager::FillTimeFrame(events);
@@ -488,7 +474,6 @@ struct AnalysisEventSelection {
488474
fSelMap.clear();
489475
fBCCollMap.clear();
490476

491-
cout << "Starting event loop for event selection" << endl;
492477
for (auto& event : events) {
493478
auto bc = event.template bc_as<BCsWithTimestamps>();
494479

@@ -541,7 +526,6 @@ struct AnalysisEventSelection {
541526
}
542527
}
543528

544-
cout << "AnalysisEventSelection::runEventSelection() completed" << endl;
545529
}
546530

547531
// Variant of runEventSelection that first checks the DqFilters EMu prefilter bit.
@@ -550,7 +534,6 @@ struct AnalysisEventSelection {
550534
template <uint32_t TEventFillMap, typename TEvents>
551535
void runEventSelectionWithFilter(TEvents const& events, BCsWithTimestamps const& bcs)
552536
{
553-
cout << "AnalysisEventSelection::runEventSelectionWithFilter() called with " << events.size() << " events and " << bcs.size() << " BCs" << endl;
554537

555538
if (bcs.size() > 0 && fCurrentRun != bcs.begin().runNumber()) {
556539
if (fConfigPostCalibTPC.fConfigComputeTPCpostCalib) {
@@ -600,7 +583,6 @@ struct AnalysisEventSelection {
600583
fCurrentRun = bcs.begin().runNumber();
601584
} // end updating the CCDB quantities at change of run
602585

603-
cout << "Filling TimeFrame statistics histograms" << endl;
604586
VarManager::ResetValues(0, VarManager::kNEventWiseVariables);
605587
VarManager::FillTimeFrame(bcs);
606588
VarManager::FillTimeFrame(events);
@@ -611,7 +593,6 @@ struct AnalysisEventSelection {
611593
fSelMap.clear();
612594
fBCCollMap.clear();
613595

614-
cout << "Starting event loop for event selection with DqFilter" << endl;
615596
for (auto& event : events) {
616597
// Skip events that did not pass any filterPP selection.
617598
// The bit position depends on filterPP config (fNBarrelCuts + fNMuonCuts + emu_index),
@@ -671,13 +652,11 @@ struct AnalysisEventSelection {
671652
}
672653
}
673654

674-
cout << "AnalysisEventSelection::runEventSelectionWithFilter() completed" << endl;
675655
}
676656

677657
template <uint32_t TEventFillMap, typename TEvents>
678658
void publishSelections(TEvents const& events)
679659
{
680-
cout << "AnalysisEventSelection::publishSelections() called" << endl;
681660
std::map<int64_t, bool> collisionSplittingMap; // key: event global index, value: whether pileup event is a possible splitting
682661

683662
// Reset the fValues array and fill event observables
@@ -752,23 +731,18 @@ struct AnalysisEventSelection {
752731
}
753732
eventSel(evSel);
754733
}
755-
cout << "AnalysisEventSelection::publishSelections() completed" << endl;
756734
}
757735

758736
void processDirect(MyEvents const& events, BCsWithTimestamps const& bcs)
759737
{
760-
cout << "AnalysisEventSelection::processDirect() called" << endl;
761738
runEventSelection<gkEventFillMapWithMults>(events, bcs);
762739
publishSelections<gkEventFillMapWithMults>(events);
763-
cout << "AnalysisEventSelection::processDirect() completed" << endl;
764740
}
765741

766742
void processDirectWithFilter(MyEventsWithDqFilter const& events, BCsWithTimestamps const& bcs)
767743
{
768-
cout << "AnalysisEventSelection::processDirectWithFilter() called" << endl;
769744
runEventSelectionWithFilter<gkEventFillMapWithMults>(events, bcs);
770745
publishSelections<gkEventFillMapWithMults>(events);
771-
cout << "AnalysisEventSelection::processDirectWithFilter() completed" << endl;
772746
}
773747

774748
void processDummy(aod::Collisions&) {}
@@ -810,7 +784,6 @@ struct AnalysisTrackSelection {
810784

811785
void init(o2::framework::InitContext& context)
812786
{
813-
cout << "AnalysisTrackSelection::init() called" << endl;
814787
if (context.mOptions.get<bool>("processDummy"))
815788
return;
816789

@@ -867,13 +840,11 @@ struct AnalysisTrackSelection {
867840
fCCDB->setCreatedNotAfter(fConfigNoLaterThan.value);
868841
fTofResponse->initSetup(fCCDB, context);
869842

870-
cout << "AnalysisTrackSelection::init() completed" << endl;
871843
}
872844

873845
template <uint32_t TEventFillMap, uint32_t TTrackFillMap, typename TEvents, typename TTracks>
874846
void runTrackSelection(TrackAssoc const& assocs, BCsWithTimestamps const& bcs, TEvents const& events, TTracks const& tracks)
875847
{
876-
cout << "AnalysisTrackSelection::runTrackSelection() called" << endl;
877848
// determine if TEvents table contains aod::Collisions
878849
// bool hasCollisions = std::is_same<typename TEvents::BaseType, aod::Collisions>::value;
879850

@@ -909,7 +880,6 @@ struct AnalysisTrackSelection {
909880
trackSel.reserve(assocs.size());
910881
trackAmbiguities.reserve(tracks.size());
911882

912-
cout << "Starting loop over track associations" << endl;
913883

914884
for (auto& assoc : assocs) {
915885
auto event = assoc.template collision_as<TEvents>();
@@ -1015,24 +985,19 @@ struct AnalysisTrackSelection {
1015985
}
1016986
}
1017987

1018-
cout << "AnalysisTrackSelection::runTrackSelection() completed" << endl;
1019988
}
1020989

1021990
void processWithCov(TrackAssoc const& assocs, BCsWithTimestamps const& bcs, MyEventsSelected const& events, MyBarrelTracksWithCov const& tracks)
1022991
{
1023-
cout << "AnalysisTrackSelection::processWithCov() called" << endl;
1024992
runTrackSelection<gkEventFillMapWithMults, gkTrackFillMapWithCov>(assocs, bcs, events, tracks);
1025-
cout << "AnalysisTrackSelection::processWithCov() completed" << endl;
1026993
}
1027994

1028995
void processWithCovTOFService(TrackAssoc const& assocs, BCsWithTimestamps const& bcs, MyEventsSelected const& events, MyBarrelTracksWithCovNoTOF const& tracks)
1029996
{
1030-
cout << "AnalysisTrackSelection::processWithCovTOFService() called" << endl;
1031997
fTofResponse->processSetup(bcs.iteratorAt(0));
1032998
auto tracksWithTOFservice = soa::Attach<MyBarrelTracksWithCovNoTOF, o2::aod::TOFNSigmaDynEl, o2::aod::TOFNSigmaDynPi,
1033999
o2::aod::TOFNSigmaDynKa, o2::aod::TOFNSigmaDynPr>(tracks);
10341000
runTrackSelection<gkEventFillMapWithMults, gkTrackFillMapWithCovNoTOF>(assocs, bcs, events, tracksWithTOFservice);
1035-
cout << "AnalysisTrackSelection::processWithCovTOFService() completed" << endl;
10361001
}
10371002

10381003
void processDummy(MyEvents&) {}
@@ -1061,7 +1026,6 @@ struct AnalysisPrefilterSelection {
10611026

10621027
void init(o2::framework::InitContext& context)
10631028
{
1064-
cout << "AnalysisPrefilterSelection::init() called" << endl;
10651029
if (context.mOptions.get<bool>("processDummy")) {
10661030
return;
10671031
}
@@ -1136,7 +1100,6 @@ struct AnalysisPrefilterSelection {
11361100

11371101
VarManager::SetupTwoProngDCAFitter(5.0f, true, 200.0f, 4.0f, 1.0e-3f, 0.9f, true); // TODO: get these parameters from Configurables
11381102
VarManager::SetupTwoProngFwdDCAFitter(5.0f, true, 200.0f, 1.0e-3f, 0.9f, true);
1139-
cout << "AnalysisPrefilterSelection::init() completed" << endl;
11401103
}
11411104

11421105
template <typename T>
@@ -1187,7 +1150,6 @@ struct AnalysisPrefilterSelection {
11871150

11881151
void processBarrel(MyEvents const& events, soa::Join<aod::TrackAssoc, aod::BarrelTrackCuts> const& assocs, MyBarrelTracksWithCov const& tracks)
11891152
{
1190-
cout << "AnalysisPrefilterSelection::processBarrel() called" << endl;
11911153
fPrefilterMap.clear();
11921154

11931155
for (auto& event : events) {
@@ -1221,7 +1183,6 @@ struct AnalysisPrefilterSelection {
12211183
}
12221184
}
12231185
}
1224-
cout << "AnalysisPrefilterSelection::processBarrel() completed" << endl;
12251186
}
12261187

12271188
void processDummy(MyEvents&)
@@ -1524,7 +1485,6 @@ struct AnalysisSameEventPairing {
15241485

15251486
void init(o2::framework::InitContext& context)
15261487
{
1527-
cout << "AnalysisSameEventPairing::init() called" << endl;
15281488
if (context.mOptions.get<bool>("processDummy")) {
15291489
return;
15301490
}
@@ -1715,12 +1675,10 @@ struct AnalysisSameEventPairing {
17151675
VarManager::SetUseVars(fHistMan->GetUsedVars()); // provide the list of required variables so that VarManager knows what to fill
17161676
fOutputList.setObject(fHistMan->GetMainHistogramList());
17171677

1718-
cout << "AnalysisSameEventPairing::init() completed" << endl;
17191678
}
17201679

17211680
void initParamsFromCCDB(uint64_t timestamp, bool withTwoProngFitter = true)
17221681
{
1723-
cout << "AnalysisSameEventPairing::initParamsFromCCDB() called for timestamp " << timestamp << endl;
17241682
if (fConfigOptions.useRemoteField.value) {
17251683
o2::parameters::GRPMagField* grpmag = fCCDB->getForTimeStamp<o2::parameters::GRPMagField>(fConfigCCDB.grpMagPath, timestamp);
17261684
o2::base::MatLayerCylSet* lut = o2::base::MatLayerCylSet::rectifyPtrFromFile(fCCDB->get<o2::base::MatLayerCylSet>(fConfigCCDB.lutPath));
@@ -1754,7 +1712,6 @@ struct AnalysisSameEventPairing {
17541712
VarManager::SetupTwoProngDCAFitter(fConfigOptions.magField.value, true, 200.0f, 4.0f, 1.0e-3f, 0.9f, fConfigOptions.useAbsDCA.value); // needed because take in varmanager Bz from fgFitterTwoProngBarrel for PhiV calculations
17551713
}
17561714
}
1757-
cout << "AnalysisSameEventPairing::initParamsFromCCDB() completed" << endl;
17581715
}
17591716

17601717
template <typename Events, typename TTracks, typename Tracks>
@@ -1812,7 +1769,6 @@ struct AnalysisSameEventPairing {
18121769
template <bool TTwoProngFitter, int TPairType, uint32_t TEventFillMap, uint32_t TTrackFillMap, typename TEvents, typename TTracks>
18131770
void runSameEventPairing(TEvents const& events, BCsWithTimestamps const& bcs, Preslice<soa::Join<aod::TrackAssoc, aod::BarrelTrackCuts, aod::Prefilter>>& preslice, soa::Join<aod::TrackAssoc, aod::BarrelTrackCuts, aod::Prefilter> const& assocs, TTracks const& tracks)
18141771
{
1815-
cout << "AnalysisSameEventPairing::runSameEventPairing() called" << endl;
18161772
if (events.size() == 0) {
18171773
LOG(warning) << "No events in this TF, going to the next one ...";
18181774
return;
@@ -1995,7 +1951,6 @@ struct AnalysisSameEventPairing {
19951951
} // end loop over pairs of track associations
19961952
} // end loop over events
19971953

1998-
cout << "AnalysisSameEventPairing::runSameEventPairing() completed" << endl;
19991954
}
20001955

20011956
// Template function for electron-muon same-event pairing (barrel x muon, full index policy)
@@ -2117,9 +2072,7 @@ struct AnalysisSameEventPairing {
21172072
soa::Join<aod::TrackAssoc, aod::BarrelTrackCuts, aod::Prefilter> const& barrelAssocs,
21182073
MyBarrelTracksWithCovWithAmbiguities const& barrelTracks)
21192074
{
2120-
cout << "AnalysisSameEventPairing::processBarrelOnly() called" << endl;
21212075
runSameEventPairing<true, VarManager::kDecayToEE, gkEventFillMapWithMults, gkTrackFillMapWithCov>(events, bcs, trackAssocsPerCollision, barrelAssocs, barrelTracks);
2122-
cout << "AnalysisSameEventPairing::processBarrelOnly() completed" << endl;
21232076
}
21242077

21252078
void processElectronMuonDirect(
@@ -2286,7 +2239,6 @@ struct AnalysisDileptonTrack {
22862239
soa::Join<aod::TrackAssoc, aod::BarrelTrackCuts> const& assocs,
22872240
MyBarrelTracksWithCov const& tracks, soa::Filtered<MyDielectronCandidates> const& dileptons)
22882241
{
2289-
std::cout << "AnalysisDileptonTrack::processBarrel() called" << std::endl;
22902242
22912243
if (events.size() == 0) return;
22922244
@@ -2308,7 +2260,6 @@ struct AnalysisDileptonTrack {
23082260
event, bcs, groupedBarrelAssocs, tracks, groupedDielectrons);
23092261
}
23102262
2311-
std::cout << "AnalysisDileptonTrack::processBarrel() completed" << std::endl;
23122263
}
23132264
23142265
void processDummy(MyEvents&) {

0 commit comments

Comments
 (0)