1 #ifndef DQMOffline_SiStripBaseServiceFromDQM_SiStripBaseServiceFromDQM_H
2 #define DQMOffline_SiStripBaseServiceFromDQM_SiStripBaseServiceFromDQM_H
18 #include <boost/lexical_cast.hpp>
19 #include <boost/shared_ptr.hpp>
73 return( ME->
getName().find(
name_) == std::string::npos );
103 dqmStore_->setVerbose(0);
105 if( iConfig_.getParameter<
bool>(
"accessDQMFile") ){
107 std::string
fileName = iConfig_.getUntrackedParameter<std::string>(
"FILE_NAME",
"");
109 edm::LogInfo(
"SiStripBaseServiceFromDQM") <<
"[SiStripBaseServiceFromDQM::openRequestedFile] Accessing root File" <<
fileName;
111 dqmStore_->open(fileName,
false);
113 edm::LogInfo(
"SiStripBaseServiceFromDQM") <<
"[SiStripBaseServiceFromDQM::openRequestedFile] Accessing dqmStore stream in Online Operation";
120 std::string currDir = dqmStore_->pwd();
121 std::string
dirName = currDir.substr(currDir.find_last_of(
"/")+1);
123 if( dirName.length() == 0 ) {
124 std::string currDirCopy(currDir, 0, currDir.length()-1);
125 dirName = currDirCopy.substr(currDirCopy.find_last_of(
"/")+1);
127 if (dirName.find(name) == 0) {
130 std::vector<std::string> subDirVec = dqmStore_->getSubdirs();
131 for (std::vector<std::string>::const_iterator ic = subDirVec.begin();
132 ic != subDirVec.end(); ic++) {
134 if (!goToDir(name)) dqmStore_->goUp();
143 std::string currDir = dqmStore_->pwd();
144 if (currDir.find(
"module_") != std::string::npos) {
146 mfolders.push_back(currDir);
148 std::vector<std::string> subdirs = dqmStore_->getSubdirs();
149 for( std::vector<std::string>::const_iterator it = subdirs.begin();
150 it != subdirs.end(); ++it) {
152 getModuleFolderList(mfolders);
185 edm::LogInfo(
"SiStripBaseServiceFromDQM") <<
"[SiStripBaseServiceFromDQM::getRunNumber] " << iConfig_.getParameter<uint32_t>(
"RunNb");
186 return iConfig_.getParameter<uint32_t>(
"RunNb");
192 std::cout <<
"SiStripPedestalsDQMService::getMetaDataString" << std::endl;
193 ss <<
"Run " << getRunNumber() << std::endl;
199 std::stringstream localString;
200 getMetaDataString(localString);
201 if( ss == localString.str() )
return false;
206 #endif //DQMOffline_SiStripBaseServiceFromDQM_SiStripBaseServiceFromDQM_H
const std::string & getName(void) const
get name of ME
virtual ~SiStripBaseServiceFromDQM()
boost::shared_ptr< SiStripFolderOrganizer > folderOrganizer_
virtual bool checkForCompatibility(std::string ss)
Check is the transfer is needed.
bool operator()(const MonitorElement *ME) const
bool goToDir(const std::string &name)
Uses DQM utilities to access the requested dir.
uint32_t getRunNumber() const
Returns the run number from the cfg.
virtual void getMetaDataString(std::stringstream &ss)
Used to fill the logDB.
void getModuleFolderList(std::vector< std::string > &mfolders)
Fill the mfolders vector with the full list of directories for all the modules.
edm::ParameterSet iConfig_
MonitorElement * getModuleHistogram(const uint32_t detId, const std::string &name)
void openRequestedFile()
Uses DQMStore to access the DQM file.
SiStripBaseServiceFromDQM(const edm::ParameterSet &)
StringNotMatch(const std::string &name)