@@ -1811,7 +1811,7 @@ MCSignal* o2::aod::dqmcsignals::GetMCSignal(const char* name)
18111811 signal = new MCSignal (name, " Jpsi from Chic2 decays" , {prong}, {1 });
18121812 return signal;
18131813 }
1814- if (nameStr == " JpsiFromChic2 " ) {
1814+ if (nameStr == " JpsiFromChic " ) {
18151815 MCProng prong (2 , {443 , 904 }, {true , true }, {false , false }, {0 , 0 }, {0 , 0 }, {false , false });
18161816 prong.SetSourceBit (0 , MCProng::kPhysicalPrimary );
18171817 signal = new MCSignal (name, " Jpsi from Chic0, Chic1 or Chic2 decays" , {prong}, {1 });
@@ -2165,7 +2165,7 @@ std::vector<MCSignal*> o2::aod::dqmcsignals::GetMCSignalsFromJSON(const char* js
21652165 // Get the common ancestors array
21662166 std::vector<int8_t > commonAncestors;
21672167 if (signal.HasMember (" commonAncestors" )) {
2168- for (auto & v : signal.FindMember (" commonAncestors" )->value .GetArray ()) {
2168+ for (const auto & v : signal.FindMember (" commonAncestors" )->value .GetArray ()) {
21692169 commonAncestors.push_back (v.GetInt ());
21702170 LOG (debug) << " common ancestor " << v.GetInt ();
21712171 }
@@ -2240,13 +2240,13 @@ bool o2::aod::dqmcsignals::ValidateJSONMCProng(T prongJSON, const char* prongNam
22402240 return false ;
22412241 }
22422242 std::vector<uint32_t > nSourceBits;
2243- for (auto & ii : prongJSON->FindMember (" sourceBits" )->value .GetArray ()) {
2243+ for (const auto & ii : prongJSON->FindMember (" sourceBits" )->value .GetArray ()) {
22442244 if (!ii.IsArray ()) {
22452245 LOG (fatal) << " The sourceBits field should be an array of arrays of MCProng::Source" ;
22462246 return false ;
22472247 }
22482248 nSourceBits.push_back (ii.GetArray ().Size ());
2249- for (auto & iii : ii.GetArray ()) {
2249+ for (const auto & iii : ii.GetArray ()) {
22502250 if (MCProng::fgSourceNames.find (iii.GetString ()) == MCProng::fgSourceNames.end ()) {
22512251 LOG (fatal) << " Source " << iii.GetString () << " not implemented in MCProng" ;
22522252 return false ;
@@ -2259,7 +2259,7 @@ bool o2::aod::dqmcsignals::ValidateJSONMCProng(T prongJSON, const char* prongNam
22592259 return false ;
22602260 }
22612261 int iElem = 0 ;
2262- for (auto & ii : prongJSON->FindMember (" excludeSource" )->value .GetArray ()) {
2262+ for (const auto & ii : prongJSON->FindMember (" excludeSource" )->value .GetArray ()) {
22632263 if (!ii.IsArray ()) {
22642264 LOG (fatal) << " The excludeSource field should be an array of arrays of bool" ;
22652265 return false ;
@@ -2337,21 +2337,21 @@ MCProng* o2::aod::dqmcsignals::ParseJSONMCProng(T prongJSON, const char* prongNa
23372337 LOG (debug) << " n: " << n;
23382338 // Get the array of PDG codes
23392339 std::vector<int > pdgs;
2340- for (auto & pdg : prongJSON->FindMember (" pdgs" )->value .GetArray ()) {
2340+ for (const auto & pdg : prongJSON->FindMember (" pdgs" )->value .GetArray ()) {
23412341 pdgs.push_back (pdg.GetInt ());
23422342 LOG (debug) << " pdgs: " << pdg.GetInt ();
23432343 }
23442344 // get the array of booleans for check both charges option
23452345 std::vector<bool > checkBothCharges;
2346- for (auto & ii : prongJSON->FindMember (" checkBothCharges" )->value .GetArray ()) {
2346+ for (const auto & ii : prongJSON->FindMember (" checkBothCharges" )->value .GetArray ()) {
23472347 checkBothCharges.push_back (ii.GetBool ());
23482348 LOG (debug) << " check both charges " << ii.GetBool ();
23492349 }
23502350
23512351 // get the array of booleans for the excludePDG option, defaults to false
23522352 std::vector<bool > excludePDG;
23532353 if (prongJSON->HasMember (" excludePDG" )) {
2354- for (auto & ii : prongJSON->FindMember (" excludePDG" )->value .GetArray ()) {
2354+ for (const auto & ii : prongJSON->FindMember (" excludePDG" )->value .GetArray ()) {
23552355 excludePDG.push_back (ii.GetBool ());
23562356 LOG (debug) << " exclude pdg " << ii.GetBool ();
23572357 }
@@ -2364,9 +2364,9 @@ MCProng* o2::aod::dqmcsignals::ParseJSONMCProng(T prongJSON, const char* prongNa
23642364 // get the source bits, and transform from string to int
23652365 std::vector<std::vector<int >> sourceBitsVec;
23662366 if (prongJSON->HasMember (" sourceBits" )) {
2367- for (auto & ii : prongJSON->FindMember (" sourceBits" )->value .GetArray ()) {
2367+ for (const auto & ii : prongJSON->FindMember (" sourceBits" )->value .GetArray ()) {
23682368 std::vector<int > sourceBits;
2369- for (auto & iii : ii.GetArray ()) {
2369+ for (const auto & iii : ii.GetArray ()) {
23702370 sourceBits.push_back (MCProng::fgSourceNames[iii.GetString ()]);
23712371 LOG (debug) << " source bit " << iii.GetString ();
23722372 }
@@ -2376,9 +2376,9 @@ MCProng* o2::aod::dqmcsignals::ParseJSONMCProng(T prongJSON, const char* prongNa
23762376 // prepare the exclusion source options if specified
23772377 std::vector<std::vector<bool >> excludeSourceVec;
23782378 if (prongJSON->HasMember (" excludeSource" )) {
2379- for (auto & ii : prongJSON->FindMember (" excludeSource" )->value .GetArray ()) {
2379+ for (const auto & ii : prongJSON->FindMember (" excludeSource" )->value .GetArray ()) {
23802380 std::vector<bool > excludeSource;
2381- for (auto & iii : ii.GetArray ()) {
2381+ for (const auto & iii : ii.GetArray ()) {
23822382 excludeSource.push_back (iii.GetBool ());
23832383 LOG (debug) << " exclude source bit " << iii.GetBool ();
23842384 }
@@ -2389,7 +2389,7 @@ MCProng* o2::aod::dqmcsignals::ParseJSONMCProng(T prongJSON, const char* prongNa
23892389 // prepare the useANDonSourceBitMap vector, defaults to true for each generation
23902390 std::vector<bool > useANDonSourceBitMap;
23912391 if (prongJSON->HasMember (" useANDonSourceBitMap" )) {
2392- for (auto & ii : prongJSON->FindMember (" useANDonSourceBitMap" )->value .GetArray ()) {
2392+ for (const auto & ii : prongJSON->FindMember (" useANDonSourceBitMap" )->value .GetArray ()) {
23932393 useANDonSourceBitMap.push_back (ii.GetBool ());
23942394 LOG (debug) << " use AND on source map " << ii.GetBool ();
23952395 }
@@ -2404,12 +2404,12 @@ MCProng* o2::aod::dqmcsignals::ParseJSONMCProng(T prongJSON, const char* prongNa
24042404 int igen = 0 ;
24052405 std::vector<uint64_t > sBitsVec ;
24062406 std::vector<uint64_t > sBitsExcludeVec ;
2407- for (auto & itgen : sourceBitsVec) {
2407+ for (const auto & itgen : sourceBitsVec) {
24082408 int is = 0 ;
24092409 uint64_t sBits = 0 ;
24102410 uint64_t sBitsExclude = 0 ;
24112411 auto excludeVec = (hasExclude ? excludeSourceVec[igen] : std::vector<bool >{});
2412- for (auto & s : itgen) {
2412+ for (const auto & s : itgen) {
24132413 bool exclude = (hasExclude ? excludeVec[is] : false );
24142414 if (s != MCProng::kNothing ) {
24152415 sBits |= (static_cast <uint64_t >(1 ) << s);
@@ -2458,15 +2458,15 @@ MCProng* o2::aod::dqmcsignals::ParseJSONMCProng(T prongJSON, const char* prongNa
24582458
24592459 std::vector<int > checkIfPDGInHistory = {};
24602460 if (prongJSON->HasMember (" checkIfPDGInHistory" )) {
2461- for (auto & ii : prongJSON->FindMember (" checkIfPDGInHistory" )->value .GetArray ()) {
2461+ for (const auto & ii : prongJSON->FindMember (" checkIfPDGInHistory" )->value .GetArray ()) {
24622462 checkIfPDGInHistory.push_back (ii.GetInt ());
24632463 LOG (debug) << " checkIfPDGInHistory: " << ii.GetInt ();
24642464 }
24652465 }
24662466
24672467 std::vector<bool > excludePDGInHistory = {};
24682468 if (prongJSON->HasMember (" excludePDGInHistory" )) {
2469- for (auto & ii : prongJSON->FindMember (" excludePDGInHistory" )->value .GetArray ()) {
2469+ for (const auto & ii : prongJSON->FindMember (" excludePDGInHistory" )->value .GetArray ()) {
24702470 excludePDGInHistory.push_back (ii.GetBool ());
24712471 LOG (debug) << " excludePDGInHistory: " << ii.GetBool ();
24722472 }
0 commit comments