2 Copyright (C) 2002-2021 CERN for the benefit of the ATLAS collaboration
7 struct LWHistAthMonWrapper::LWHistAthenaMonCustomData
9 std::string streamName;
13 inline void LWHistAthMonWrapper::setStreamName(LWHist*h, const std::string& streamName)
16 if (!h->getCustomData())
17 h->setCustomData(new LWHistAthenaMonCustomData);
18 reinterpret_cast<LWHistAthenaMonCustomData*>(h->getCustomData())->streamName = streamName;
21 inline void LWHistAthMonWrapper::setKey(LWHist*h, const std::string& key)
23 if (!h->getCustomData())
24 h->setCustomData(new LWHistAthenaMonCustomData);
25 reinterpret_cast<LWHistAthenaMonCustomData*>(h->getCustomData())->key = key;
28 inline const std::string& LWHistAthMonWrapper::streamName(LWHist*h)
30 // cppcheck-suppress assertWithSideEffect
31 assert(h->getCustomData());
32 return reinterpret_cast<LWHistAthenaMonCustomData*>(h->getCustomData())->streamName;
36 inline const std::string& LWHistAthMonWrapper::key(LWHist*h)
38 // cppcheck-suppress assertWithSideEffect
39 assert(h->getCustomData());
40 return reinterpret_cast<LWHistAthenaMonCustomData*>(h->getCustomData())->key;
43 inline void LWHistAthMonWrapper::removeCustomData(LWHist*h)
45 char *c = reinterpret_cast<char*>(h->getCustomData());
47 delete reinterpret_cast<LWHistAthenaMonCustomData*>(c);
51 inline void LWHistAthMonWrapper::deleteLWHist(LWHist*h)
54 LWHist::safeDelete(h);