8 #include <boost/algorithm/string.hpp>
32 std::vector<std::string> strs;
70 std::vector<std::string> nameVector;
74 for (
unsigned int i=0;
i<nameVector.size();
i++)
78 concatValues+=
","+nameVector[
i];
83 concatValues+=nameVector[
i];
96 void runInspector(
const string &
dbName,
const string &tagName,
const string & Password,
const string & whiteListFile,
const string & selectedTrends,
const int Start,
const int End ,
const string &CondList =
"")
101 string condition =
"";
102 string blackList =
"";
107 vector<string> ItemsForIntegration;
108 ItemsForIntegration.push_back(
"Chi2oNDF_GenTk_entries");
109 ItemsForIntegration.push_back(
"NumberOfTracks_GenTk_entries");
115 makeTrend.
setDB(dbName,tagName,
"/afs/cern.ch/cms/DB/conddb");
130 std::ifstream trendsFile;
131 trendsFile.open(trendsFileName.c_str());
133 std::cout <<
"Error: trends configuration file: " << trendsFileName <<
" not found" << std::endl;
138 if ( CondList !=
"" ){
139 std::ifstream condFile;
140 condFile.open(CondList.c_str());
144 while (!condFile.eof()){
146 getline(condFile, line);
155 cout << condition << endl;
158 std::cout <<
"Warning: File " << CondList <<
" not found : conditions will not be used" << std::endl;
165 typedef std::map<std::string,plotData> trendsMap;
167 std::map<std::string,plotData> superImposedtrendsMap;
169 std::vector<plotData> trendsVector;
171 typedef std::map<std::string,plotData>::iterator trendsMapIter;
174 while( !trendsFile.eof() )
177 getline(trendsFile, line);
180 std::vector<std::string> strs;
184 if( strs.size() == 8 )
190 trendsVector.push_back(plot);
193 pair<trendsMapIter, bool> insertResult = superImposedtrendsMap.insert(std::make_pair(index,plot));
194 if(!insertResult.second)
197 superImposedtrendsMap[
index].names +=
"," + newName;
203 std::cout <<
"Warning: trend configuration line: " << line <<
" is not formatted correctly. It will be skipped." << std::endl;
210 for(map<std::string,plotData>::const_iterator it = superImposedtrendsMap.begin(); it != superImposedtrendsMap.end(); ++it)
222 for (
unsigned int i=0;
i<trendsVector.size();
i++)
229 cout <<
"Test Web: Trends created. " << endl;
231 for_each(config.begin(), config.end(), makeTrend);
232 cout <<
"Test Web: Trends maded" << endl;
242 gSystem->Load(
"libFWCoreFWLite" );
246 std::cerr << argv[0] <<
" [Database] [TagName] [Password] [WhiteListFile] [SelectedTrends] [FirstRun] [LastRun] [CondList]" << std::endl;
250 std::cout <<
"Creating trends for range: " << argv[6] <<
" " << argv[7] <<
" for tag: " << argv[1] << std::endl;
251 runInspector( argv[1], argv[2], argv[3], argv[4], argv[5], atoi(argv[6]), atoi(argv[7]), argv[8] );
void setWhiteListFromFile(const std::string &listFileName)
void setDebug(const int i)
static const HistoName names[]
virtual bool computeIntegralList(const std::vector< std::string > &computeIntegralVector)
fills the list of names of quantities for which a summation over the runs is required ...
std::string concatNames(const string &line)
int main(int argc, char **argv)
void setSkip99s(bool const in)
void setDB(std::string dbName, std::string dbTag, std::string authPath="")
static void enable()
enable automatic library loading
void setBlackList(const std::string &listItems)
void fill(const std::string &value, T &var)
char data[epos_bytes_allocation]
void runInspector(const string &dbName, const string &tagName, const string &Password, const string &whiteListFile, const string &selectedTrends, const int Start, const int End, const string &CondList="")
plotData(const std::string &data)
void setDoStat(const int i)