/////////////////////////////////////////////////////////////////////////////// // Ludovico Cavedon Aug 23, 2006 // based on Andrea Castro's TDCacheMonitor // stores plots and HTML files into $OFFLINE_MON_DIR /////////////////////////////////////////////////////////////////////////////// #include "TSystem.h" #include "TStyle.h" #include "TFile.h" #include "TTree.h" #include "TH1.h" #include "TProfile.h" #include "TLegend.h" #include "TLine.h" #include "TCanvas.h" #include "TPaveText.h" #include "TSQLServer.h" #include "TSQLResult.h" #include "TSQLRow.h" #include /* Directory information. */ #include #include "OfflineMon/TDCacheQueuesMonitor.hh" ClassImp(TDCacheQueuesMonitor) ClassImp(TDCacheQueuesMonitor::Data_t) const int TDCacheQueuesMonitor::colormap[] = {1, 2, 3, 4, 5, 6, 7, 11, 21, 31, 41}; template static inline T MAX(T a, T b) { return a > b ? a : b; } template static inline T MAX(T a, T b, T c) { return MAX(MAX(a, b), c); } //_____________________________________________________________________________ TDCacheQueuesMonitor::TDCacheQueuesMonitor(const char* Name): TOfflineMonitor(Name) { fData = new TDCacheQueuesMonitor::Data_t(); fDataD = new TDCacheQueuesMonitor::DataD_t(); } //_____________________________________________________________________________ TDCacheQueuesMonitor::~TDCacheQueuesMonitor() { delete fData; delete fDataD; } //_____________________________________________________________________________ int TDCacheQueuesMonitor::Init() { printf(" inside TDCacheQueuesMonitor::Init()\n"); FILE * fIn; char dummy[200]; // initialize Group structure TString grFile; float pct1, pct2, tim1, tim2; int gId, gMskDisk, gMskTime; // group Id: 1=test, 2=top, 3=stn, 4=bnt, 5=ewk, 6=exo, 7=qcd fGroups.fNumGroups=0; grFile = fInputDirName + "groupNames.dat"; fIn = fopen(grFile,"r"); // while(fscanf(fIn,"%s %d %f %f %f %f %d %d",dummy, &gId, &pct1, &pct2, &tim1, &tim2, &gMskDisk, &gMskTime)!=EOF) { while(fscanf(fIn,"%s %d",dummy, &gId)!=EOF) { fGroups.fGroupName[fGroups.fNumGroups] = dummy; fGroups.fGroupId[fGroups.fNumGroups] = gId; fGroups.fUseThis[fGroups.fNumGroups]=1; if(strncmp(dummy,"default",7)==0) fGroups.fUseThis[fGroups.fNumGroups]=0; fGroups.fNumGroups++; } fclose(fIn); fDomains.fNumDomains=0; TString file = fInputDirName + "domainNames.dat"; fIn = fopen(file,"r"); while(fscanf(fIn,"%s",dummy)!=EOF) { fDomains.fDomainName[fDomains.fNumDomains] = dummy; fDomains.fNumDomains++; } fclose(fIn); // initialize Status structure fPools.numAllPools=0; /* fStatus.time = lastAccess; for(int ig=0; ig using std::string; #define FILLSTRLEN 300 printf(" inside TDCacheQueuesMonitor::UpdateNtuple()\n"); TDatime thisTime; TDatime now; char fillStr[FILLSTRLEN]; char newDir[300]; Int_t nFiles, nFilesTot; int cmpLen, len; char *inFile[MAX_FILES], *inFileB[MAX_FILES], *inFileT[MAX_FILES], *inFileL[MAX_GROUPS][MAX_FILES], *inFileUa[NUM_ADM_NODES][MAX_FILES], *inFileUp[NUM_POOL_NODES][MAX_FILES]; // an array of strings char dummy[300], cmp[200]; char cyear[5], cmonth[3], cday[3], chour[3], cmin[3], csec[3]; int year, month, day, hour, min, sec; int dotPosition; char * dot; float timeDiff; int nev; // first the pools files sprintf(cmp,"%spools/queues",fInputDirName.Data()); cmpLen = strlen(cmp); TString inDir; DIR *dir_p; struct dirent *dir_entry_p; inDir = fInputDirName + "pools"; dir_p = opendir(inDir); // open the directory nFiles=0; while( NULL != (dir_entry_p = readdir(dir_p))) { // loop over all files in the directory sprintf(dummy,"%s/%s", inDir.Data(), dir_entry_p->d_name); // printf("dummy %d %s\n", nFiles, dummy); fflush(stdout); // we need to check if this file is more recent than the last file used in the ntuple, if yes keep it! len = strlen(dummy) + 1; char* newSpace = new char[len]; // allocate with new strcpy(newSpace, dummy); // copy to new space if(strncmp(cmp, newSpace, cmpLen)==0) { // only dcache pools files dot=strchr(dir_entry_p->d_name,'.'); dotPosition=dot-dir_entry_p->d_name+1; cyear[0] = dir_entry_p->d_name[dotPosition]; cyear[1] = dir_entry_p->d_name[dotPosition+1]; cyear[2] = dir_entry_p->d_name[dotPosition+2]; cyear[3] = dir_entry_p->d_name[dotPosition+3]; cmonth[0] = dir_entry_p->d_name[dotPosition+5]; cmonth[1] = dir_entry_p->d_name[dotPosition+6]; cday[0] = dir_entry_p->d_name[dotPosition+8]; cday[1] = dir_entry_p->d_name[dotPosition+9]; /* chour[0] = dir_entry_p->d_name[dotPosition+11]; chour[1] = dir_entry_p->d_name[dotPosition+12]; cmin[0] = dir_entry_p->d_name[dotPosition+14]; cmin[1] = dir_entry_p->d_name[dotPosition+15]; csec[0] = dir_entry_p->d_name[dotPosition+17]; csec[1] = dir_entry_p->d_name[dotPosition+18]; */ // thisTime = TDatime(atoi(cyear), atoi(cmonth), atoi(cday), atoi(chour), atoi(cmin), atoi(csec)); thisTime = TDatime(atoi(cyear), atoi(cmonth), atoi(cday), 0, 0, 0); if(atoi(cyear)<1995) printf(" WARNING 1 year %d <1995\n", atoi(cyear)); timeDiff = now.Convert() - thisTime.Convert(); timeDiff/=60.; if(timeDiff < TMAX_MONTH) { // then include as new files inFile[nFiles] = newSpace; // save pointer nFiles++; } } // end if dcache pools files } closedir(dir_p); // close the directory fData->fLastFileTime = fDataD->fLastFileTime = thisTime; fData->fNfiles = fDataD->fNfiles = nFiles; // we store here the date-time of the (alphabetically)last history file. // this is also the last file written unless we change the way the date-time is concatenated inside the file name TFile* ntupleOut; TTree * tree; TBranch* br, *brD; FILE* f; char ntuName[200], mtuNameD[200]; // dcache pools files/ntuple if(nFiles>0) { // then we update the ntuple sprintf(ntuName,"%s.root",fNtupleFileName.Data()); ntupleOut = new TFile(ntuName,"recreate"); tree = new TTree("dcache_queues_monitor","DCacheQueues Monitor"); br = tree->Branch("DCacheQueuesMonitor","TDCacheQueuesMonitor::Data_t", &fData); brD = tree->Branch("DCacheQueuesDomainMonitor","TDCacheQueuesMonitor::DataD_t", &fDataD); // loop over dcache pool files char *inFileBis; nev=0; for(int i=0; ifNumGroups = fGroups.fNumGroups; // printf("fopen %d/%d *%s*\n", i, nFiles, inFile[i]); fflush(stdout); f = fopen(inFile[i],"r"); // printf("f=%x\n", f); fflush(stdout); int nb = strlen(inFile[i]); inFileBis = new char[nb+1]; // printf("new done\n"); fflush(stdout); strcpy(inFileBis, inFile[i]); dot=strchr(inFile[i],'.'); dotPosition=dot-inFile[i]+1; cyear[0] = inFileBis[dotPosition]; cyear[1] = inFileBis[dotPosition+1]; cyear[2] = inFileBis[dotPosition+2]; cyear[3] = inFileBis[dotPosition+3]; cmonth[0] = inFileBis[dotPosition+5]; cmonth[1] = inFileBis[dotPosition+6]; cday[0] = inFileBis[dotPosition+8]; cday[1] = inFileBis[dotPosition+9]; /* chour[0] = inFileBis[dotPosition+11]; chour[1] = inFileBis[dotPosition+12]; cmin[0] = inFileBis[dotPosition+14]; cmin[1] = inFileBis[dotPosition+15]; csec[0] = inFileBis[dotPosition+17]; csec[1] = inFileBis[dotPosition+18]; */ // printf("date conversion\n"); fflush(stdout); // thisTime = TDatime(atoi(cyear), atoi(cmonth), atoi(cday), atoi(chour), atoi(cmin), atoi(csec)); thisTime = TDatime(atoi(cyear), atoi(cmonth), atoi(cday), 0, 0, 0); if(atoi(cyear)<1995) printf(" WARNING 2 year %d <1995\n", atoi(cyear)); // fData->fAbsTime = thisTime.Convert(); fData->fIfile = i; // printf("data init\n"); fflush(stdout); char* newSpace; char pool[20]; int len; int isp; int ig; UInt_t active, queued, maxActive; // char volume[20]; // the order is bnt/top/stn/tst/ewk/exo/qcd // printf("first scanf\n"); fflush(stdout); while(fscanf(f, "%d-%d-%d.%d-%d-%d", &year, &month, &day, &hour, &min, &sec) != EOF) { // printf("ts: %d-%d-%d.%d-%d-%d\n", year, month, day, hour, min, sec); // first initialize to zero fPools.numAllPools=0; for(ig=0; igfActive[ig]=fData->fQueued[ig]=fData->fMaxActive[ig]=0; fData->fNumPools[ig]=0; } for(int id=0; idfActive[id]=fDataD->fQueued[id]=fDataD->fMaxActive[id]=0; fDataD->fNumPools[id]=0; } fData->fTime = fDataD->fTime = TDatime(year, month, day, hour, min, sec); fData->fAbsTime = fDataD->fAbsTime = fData->fTime.Convert(); fscanf(f,"%s", pool); // printf("fakepool=%s\n", pool); fflush(stdout); for(ig=0; ig 0 && strcmp(pool,(fGroups.fGroupName[ig+1]).Data())!=0) { // printf("pool=%s ig=%d fData->fNumPools[ig]=%d\n", pool, ig, fData->fNumPools[ig]); fflush(stdout); len = strlen(pool) + 1; newSpace = new char[len]; strcpy(newSpace, pool); fPools.fPoolName[ig][fData->fNumPools[ig]] = newSpace; fData->fNumPools[ig]++; if(fGroups.fUseThis[ig]==1) fPools.numAllPools++; // do not repeat for "default" group } } ig=fGroups.fNumGroups-1; while(fscanf(f,"%s", pool) > 0 && strcmp(pool,"queue")!=0) { // printf("gopool=%s ig=%d\n", pool, ig); fflush(stdout); len = strlen(pool) + 1; newSpace = new char[len]; strcpy(newSpace, pool); fPools.fPoolName[ig][fData->fNumPools[ig]] = newSpace; fData->fNumPools[ig]++; if(fGroups.fUseThis[ig]==1) fPools.numAllPools++; // do not repeat for "default" group } char domain[300]; int asp=0; while( fscanf(f,"%s", pool) != EOF && strcmp(pool,"----")!=0) { // printf("*pool=%s infile=%s\n", pool, inFile[i]); fflush(stdout); fscanf(f,"%s", domain); fscanf(f,"%s", dummy); // added to handle disk I/O errors if(strncmp(dummy,"[204]",5)!=0) { // added active = atoi(dummy); // added fscanf(f,"%d", &maxActive); //max queued fscanf(f,"%d", &queued); /* if(queued > 0) printf("WOW! queued=%d, pool=%s\n", queued, pool);*/ } else { printf(" DISK I/O error on pool %s file %s\n", pool,inFile[i] ); //AC } for(int j=0; j < 4*3; j++) // skip Restores, Stores, P2P-Server, P2P-Client fscanf(f,"%s", dummy); fPools.fAllPoolName[asp] = pool; asp++; for(ig=0; igfNumPools[ig]; isp++) { if(strncmp(pool,fPools.fPoolName[ig][isp],strlen(fPools.fPoolName[ig][isp]))==0) { fData->fActive[ig] += active; fData->fMaxActive[ig] += maxActive; fData->fQueued[ig] += queued; /* if(queued > 0) printf("WOWWOW! queued=%d\n", queued);*/ } } } for(int id=0; idfActive[id] += active; fDataD->fMaxActive[id] += maxActive; fDataD->fQueued[id] += queued; fDataD->fNumPools[id]++; break; } } } // end of while loop fData->fNev = nev; //----------------------------------------------------------------------------- // output files //----------------------------------------------------------------------------- /* for(ig=0; igfActive[ig], fData->fQueued[ig]); }*/ tree->Fill(); nev++; } fclose(f); } // end of loop over files ntupleOut->Write(); delete ntupleOut; } // endif nFiles>0 printf(" end TDCacheQueuesMonitor::UpdateNtuple()\n"); return 0; } //_____________________________________________________________________________ int TDCacheQueuesMonitor::MakePlots(const char* HtmlFile) { printf(" inside TDCacheQueuesMonitor::MakePlots()\n"); gStyle->SetOptDate(1); // to add the date in the bottom-left corner gStyle->SetTitleX(0.2); // to shift the title a bit to the right char hName[100], hTitle[100]; TH1F *hActiveDay[fGroups.fNumGroups]; TH1F *hActiveWeek[fGroups.fNumGroups]; TH1F *hActiveMonth[fGroups.fNumGroups]; TH1F *hQueuedDay[fGroups.fNumGroups]; TH1F *hQueuedWeek[fGroups.fNumGroups]; TH1F *hQueuedMonth[fGroups.fNumGroups]; TH1F *hMaxActiveDay[fGroups.fNumGroups]; TH1F *hMaxActiveWeek[fGroups.fNumGroups]; TH1F *hMaxActiveMonth[fGroups.fNumGroups]; TH1F *hActiveDayD[fGroups.fNumGroups]; TH1F *hActiveWeekD[fGroups.fNumGroups]; TH1F *hActiveMonthD[fGroups.fNumGroups]; TH1F *hQueuedDayD[fGroups.fNumGroups]; TH1F *hQueuedWeekD[fGroups.fNumGroups]; TH1F *hQueuedMonthD[fGroups.fNumGroups]; TH1F *hMaxActiveDayD[fGroups.fNumGroups]; TH1F *hMaxActiveWeekD[fGroups.fNumGroups]; TH1F *hMaxActiveMonthD[fGroups.fNumGroups]; for(int ig=0; ig (tree->GetEntries()); // printf(" end TDCacheQueuesMonitor::MakePlots()a1a\n"); tree->SetBranchAddress("DCacheQueuesMonitor", &fData); tree->SetBranchAddress("DCacheQueuesDomainMonitor", &fDataD); // printf(" end TDCacheQueuesMonitor::MakePlots()a1b\n"); for(int nev=0; nevGetEvent(nev); absTime = fData->fAbsTime; timeDiff = absTime; timeDiff -=absNow; timeDay = timeDiff/60. + TMAX_DAY; // (min) because TDatime.Convert() gives the time in seconds timeWeek = timeDiff/60. + TMAX_WEEK; // (min) timeMonth = timeDiff/60. + TMAX_MONTH; // (min) for(int ig=0; igfActive[ig]; queued=fData->fQueued[ig]; maxActive=fData->fMaxActive[ig]; // if(active != 0) // printf("active=%d timeDay=%f\n", active, timeDay); if(timeDay>0 && timeDay < TMAX_DAY) { tBin = static_cast ( (timeDay/TMAX_DAY)*NBINS_TIME_DAY ); numPoolDay[ig][tBin]++; activeDay[ig][tBin] += active; queuedDay[ig][tBin] += queued; maxActiveDay[ig][tBin] += maxActive; // printf("active=%d timeDay=%f ig=%d bin=%d\n", active, timeDay, ig, tBin); } if(timeWeek>0 && timeWeek < TMAX_WEEK) { tBin = static_cast ( (timeWeek/TMAX_WEEK)*NBINS_TIME_WEEK ); numPoolWeek[ig][tBin]++; activeWeek[ig][tBin] += active; queuedWeek[ig][tBin] += queued; maxActiveWeek[ig][tBin] += maxActive; } if(timeMonth>0 && timeMonth < TMAX_MONTH) { tBin = static_cast ( (timeMonth/TMAX_MONTH)*NBINS_TIME_MONTH ); numPoolMonth[ig][tBin]++; activeMonth[ig][tBin] += active; queuedMonth[ig][tBin] += queued; maxActiveMonth[ig][tBin] += maxActive; } } // loop over groups for(int id=0; idfActive[id]; queued=fDataD->fQueued[id]; maxActive=fDataD->fMaxActive[id]; if(timeDay>0 && timeDay < TMAX_DAY) { tBin = static_cast ( (timeDay/TMAX_DAY)*NBINS_TIME_DAY ); numPoolDayD[id][tBin]++; activeDayD[id][tBin] += active; queuedDayD[id][tBin] += queued; maxActiveDayD[id][tBin] += maxActive; } if(timeWeek>0 && timeWeek < TMAX_WEEK) { tBin = static_cast ( (timeWeek/TMAX_WEEK)*NBINS_TIME_WEEK ); numPoolWeekD[id][tBin]++; activeWeekD[id][tBin] += active; queuedWeekD[id][tBin] += queued; maxActiveWeekD[id][tBin] += maxActive; } if(timeMonth>0 && timeMonth < TMAX_MONTH) { tBin = static_cast ( (timeMonth/TMAX_MONTH)*NBINS_TIME_MONTH ); numPoolMonthD[id][tBin]++; activeMonthD[id][tBin] += active; queuedMonthD[id][tBin] += queued; maxActiveMonthD[id][tBin] += maxActive; } } // loop over domains } // loop over entries ntuple_file.Close(); for(int ig=0; ig0) { // printf("ig=%d bin=%d q=%f a=%f\n", ig, i, queuedDay[ig][i], activeDay[ig][i]); queuedDay[ig][i]/= numPoolDay[ig][i]; activeDay[ig][i]/= numPoolDay[ig][i]; maxActiveDay[ig][i]/= numPoolDay[ig][i]; } hActiveDay[ig]->SetBinContent(i+1, activeDay[ig][i]); hQueuedDay[ig]->SetBinContent(i+1, queuedDay[ig][i]); hMaxActiveDay[ig]->SetBinContent(i+1, maxActiveDay[ig][i]); if((i%(NBINS_TIME_DAY/8))==0) { hour = (i*24)/NBINS_TIME_DAY -24; hour += hourNow; if(hour <0) hour += 24; if(hour<10 && minNow <10) sprintf(hourMinC,"0%d:0%d\n", hour, minNow); if(hour>=10 && minNow<10) sprintf(hourMinC,"%d:0%d\n", hour, minNow); if(hour<10 && minNow>=10) sprintf(hourMinC,"0%d:%d\n", hour, minNow); if(hour>=10 && minNow>=10) sprintf(hourMinC,"%d:%d\n", hour, minNow); hActiveDay[ig]->GetXaxis()->SetBinLabel(i+1,hourMinC); hQueuedDay[ig]->GetXaxis()->SetBinLabel(i+1,hourMinC); hMaxActiveDay[ig]->GetXaxis()->SetBinLabel(i+1,hourMinC); } } for (int i=0; i0) { queuedWeek[ig][i]/= numPoolWeek[ig][i]; activeWeek[ig][i]/= numPoolWeek[ig][i]; maxActiveWeek[ig][i]/= numPoolWeek[ig][i]; } hActiveWeek[ig]->SetBinContent(i+1, activeWeek[ig][i]); hQueuedWeek[ig]->SetBinContent(i+1, queuedWeek[ig][i]); hMaxActiveWeek[ig]->SetBinContent(i+1, maxActiveWeek[ig][i]); if((i%(NBINS_TIME_WEEK/7))==0) { day = (i*7)/NBINS_TIME_WEEK -7; day += dayNow; if(day<=0) day += dayPrevM; sprintf(dayC,"%d", day); hActiveWeek[ig]->GetXaxis()->SetBinLabel(i+1,dayC); hQueuedWeek[ig]->GetXaxis()->SetBinLabel(i+1,dayC); hMaxActiveWeek[ig]->GetXaxis()->SetBinLabel(i+1,dayC); } } for (int i=0; i0) { queuedMonth[ig][i]/= numPoolMonth[ig][i]; activeMonth[ig][i]/= numPoolMonth[ig][i]; maxActiveMonth[ig][i]/= numPoolMonth[ig][i]; } hActiveMonth[ig]->SetBinContent(i+1, activeMonth[ig][i]); hQueuedMonth[ig]->SetBinContent(i+1, queuedMonth[ig][i]); hMaxActiveMonth[ig]->SetBinContent(i+1, maxActiveMonth[ig][i]); if((i%(NBINS_TIME_MONTH/31))==0) { day = (i*31)/NBINS_TIME_MONTH -31; day += dayNow; if(day<=0) day += dayPrevM; sprintf(dayC,"%d", day); hActiveMonth[ig]->GetXaxis()->SetBinLabel(i+1,dayC); hQueuedMonth[ig]->GetXaxis()->SetBinLabel(i+1,dayC); hMaxActiveMonth[ig]->GetXaxis()->SetBinLabel(i+1,dayC); } } } // end loop over groups for(int id=0; id0) { queuedDayD[id][i]/= numPoolDayD[id][i]; activeDayD[id][i]/= numPoolDayD[id][i]; maxActiveDayD[id][i]/= numPoolDayD[id][i]; } hActiveDayD[id]->SetBinContent(i+1, activeDayD[id][i]); hQueuedDayD[id]->SetBinContent(i+1, queuedDayD[id][i]); hMaxActiveDayD[id]->SetBinContent(i+1, maxActiveDayD[id][i]); if((i%(NBINS_TIME_DAY/8))==0) { hour = (i*24)/NBINS_TIME_DAY -24; hour += hourNow; if(hour <0) hour += 24; if(hour<10 && minNow <10) sprintf(hourMinC,"0%d:0%d\n", hour, minNow); if(hour>=10 && minNow<10) sprintf(hourMinC,"%d:0%d\n", hour, minNow); if(hour<10 && minNow>=10) sprintf(hourMinC,"0%d:%d\n", hour, minNow); if(hour>=10 && minNow>=10) sprintf(hourMinC,"%d:%d\n", hour, minNow); hActiveDayD[id]->GetXaxis()->SetBinLabel(i+1,hourMinC); hQueuedDayD[id]->GetXaxis()->SetBinLabel(i+1,hourMinC); hMaxActiveDayD[id]->GetXaxis()->SetBinLabel(i+1,hourMinC); } } for (int i=0; i0) { queuedWeekD[id][i]/= numPoolWeekD[id][i]; activeWeekD[id][i]/= numPoolWeekD[id][i]; maxActiveWeekD[id][i]/= numPoolWeekD[id][i]; } hActiveWeekD[id]->SetBinContent(i+1, activeWeekD[id][i]); hQueuedWeekD[id]->SetBinContent(i+1, queuedWeekD[id][i]); hMaxActiveWeekD[id]->SetBinContent(i+1, maxActiveWeekD[id][i]); if((i%(NBINS_TIME_WEEK/7))==0) { day = (i*7)/NBINS_TIME_WEEK -7; day += dayNow; if(day<=0) day += dayPrevM; sprintf(dayC,"%d", day); hActiveWeekD[id]->GetXaxis()->SetBinLabel(i+1,dayC); hQueuedWeekD[id]->GetXaxis()->SetBinLabel(i+1,dayC); hMaxActiveWeekD[id]->GetXaxis()->SetBinLabel(i+1,dayC); } } for (int i=0; i0) { queuedMonthD[id][i]/= numPoolMonthD[id][i]; activeMonthD[id][i]/= numPoolMonthD[id][i]; maxActiveMonthD[id][i]/= numPoolMonthD[id][i]; } hActiveMonthD[id]->SetBinContent(i+1, activeMonthD[id][i]); hQueuedMonthD[id]->SetBinContent(i+1, queuedMonthD[id][i]); hMaxActiveMonthD[id]->SetBinContent(i+1, maxActiveMonthD[id][i]); if((i%(NBINS_TIME_MONTH/31))==0) { day = (i*31)/NBINS_TIME_MONTH -31; day += dayNow; if(day<=0) day += dayPrevM; sprintf(dayC,"%d", day); hActiveMonthD[id]->GetXaxis()->SetBinLabel(i+1,dayC); hQueuedMonthD[id]->GetXaxis()->SetBinLabel(i+1,dayC); hMaxActiveMonthD[id]->GetXaxis()->SetBinLabel(i+1,dayC); } } } // end loop over domains // // now plot histograms // TString psFile, gifFile; for(int ig=0; igSetStats(false); hActiveDay[ig]->GetXaxis()->SetLabelSize(0.06); hActiveDay[ig]->GetYaxis()->SetTitle("N. of movers"); hActiveDay[ig]->GetXaxis()->SetTitle("Time"); hActiveDay[ig]->GetYaxis()->SetLabelSize(0.04); hActiveDay[ig]->GetYaxis()->SetTitleSize(0.06); hActiveDay[ig]->GetYaxis()->SetTitleOffset(0.8); //hActiveDay[ig]->GetXaxis()->SetBinLabel(i+1,"now"); hActiveDay[ig]->GetXaxis()->LabelsOption("h"); hQueuedDay[ig]->SetStats(false); hQueuedDay[ig]->GetXaxis()->SetLabelSize(0.06); hQueuedDay[ig]->GetYaxis()->SetTitle("N. of movers"); hQueuedDay[ig]->GetXaxis()->SetTitle("Time"); hQueuedDay[ig]->GetYaxis()->SetLabelSize(0.04); hQueuedDay[ig]->GetYaxis()->SetTitleSize(0.06); hQueuedDay[ig]->GetYaxis()->SetTitleOffset(0.8); //hQueuedDay[ig]->GetXaxis()->SetBinLabel(i+1,"now"); hQueuedDay[ig]->GetXaxis()->LabelsOption("h"); hMaxActiveDay[ig]->SetStats(false); hMaxActiveDay[ig]->GetXaxis()->SetLabelSize(0.06); hMaxActiveDay[ig]->GetYaxis()->SetTitle("N. of movers"); hMaxActiveDay[ig]->GetXaxis()->SetTitle("Time"); hMaxActiveDay[ig]->GetYaxis()->SetLabelSize(0.04); hMaxActiveDay[ig]->GetYaxis()->SetTitleSize(0.06); hMaxActiveDay[ig]->GetYaxis()->SetTitleOffset(0.8); //hMaxActiveDay[ig]->GetXaxis()->SetBinLabel(i+1,"now"); hMaxActiveDay[ig]->GetXaxis()->LabelsOption("h"); hActiveWeek[ig]->SetStats(false); hActiveWeek[ig]->GetXaxis()->SetLabelSize(0.08); hActiveWeek[ig]->GetYaxis()->SetTitle("N. of movers"); hActiveWeek[ig]->GetXaxis()->SetTitle("Day"); hActiveWeek[ig]->GetYaxis()->SetLabelSize(0.06); hActiveWeek[ig]->GetYaxis()->SetTitleSize(0.06); hActiveWeek[ig]->GetYaxis()->SetTitleOffset(0.8); hActiveWeek[ig]->GetXaxis()->LabelsOption("h"); hQueuedWeek[ig]->SetStats(false); hQueuedWeek[ig]->GetXaxis()->SetLabelSize(0.08); hQueuedWeek[ig]->GetYaxis()->SetTitle("N. of movers"); hActiveWeek[ig]->GetXaxis()->SetTitle("Day"); hQueuedWeek[ig]->GetYaxis()->SetLabelSize(0.06); hQueuedWeek[ig]->GetYaxis()->SetTitleSize(0.06); hQueuedWeek[ig]->GetYaxis()->SetTitleOffset(0.8); hQueuedWeek[ig]->GetXaxis()->LabelsOption("h"); hMaxActiveWeek[ig]->SetStats(false); hMaxActiveWeek[ig]->GetXaxis()->SetLabelSize(0.08); hMaxActiveWeek[ig]->GetYaxis()->SetTitle("N. of movers"); hMaxActiveWeek[ig]->GetXaxis()->SetTitle("Day"); hMaxActiveWeek[ig]->GetYaxis()->SetLabelSize(0.06); hMaxActiveWeek[ig]->GetYaxis()->SetTitleSize(0.06); hMaxActiveWeek[ig]->GetYaxis()->SetTitleOffset(0.8); hMaxActiveWeek[ig]->GetXaxis()->LabelsOption("h"); hActiveMonth[ig]->SetStats(false); hActiveMonth[ig]->GetXaxis()->SetLabelSize(0.08); hActiveMonth[ig]->GetYaxis()->SetTitle("N. of movers"); hActiveMonth[ig]->GetXaxis()->SetTitle("Day"); hActiveMonth[ig]->GetYaxis()->SetLabelSize(0.06); hActiveMonth[ig]->GetYaxis()->SetTitleSize(0.06); hActiveMonth[ig]->GetYaxis()->SetTitleOffset(0.8); hActiveMonth[ig]->GetXaxis()->LabelsOption("h"); hQueuedMonth[ig]->SetStats(false); hQueuedMonth[ig]->GetXaxis()->SetLabelSize(0.08); hQueuedMonth[ig]->GetYaxis()->SetTitle("N. of movers"); hActiveMonth[ig]->GetXaxis()->SetTitle("Day"); hQueuedMonth[ig]->GetYaxis()->SetLabelSize(0.06); hQueuedMonth[ig]->GetYaxis()->SetTitleSize(0.06); hQueuedMonth[ig]->GetYaxis()->SetTitleOffset(0.8); hQueuedMonth[ig]->GetXaxis()->LabelsOption("h"); hMaxActiveMonth[ig]->SetStats(false); hMaxActiveMonth[ig]->GetXaxis()->SetLabelSize(0.08); hMaxActiveMonth[ig]->GetYaxis()->SetTitle("N. of movers"); hMaxActiveMonth[ig]->GetXaxis()->SetTitle("Day"); hMaxActiveMonth[ig]->GetYaxis()->SetLabelSize(0.06); hMaxActiveMonth[ig]->GetYaxis()->SetTitleSize(0.06); hMaxActiveMonth[ig]->GetYaxis()->SetTitleOffset(0.8); hMaxActiveMonth[ig]->GetXaxis()->LabelsOption("h"); hActiveDay[ig]->SetFillColor(kGreen); hActiveWeek[ig]->SetFillColor(kGreen); hActiveMonth[ig]->SetFillColor(kGreen); hQueuedDay[ig]->SetFillColor(kRed); hQueuedDay[ig]->SetFillStyle(3003); hQueuedWeek[ig]->SetFillColor(kRed); hQueuedWeek[ig]->SetFillStyle(3003); hQueuedMonth[ig]->SetFillColor(kRed); hQueuedMonth[ig]->SetFillStyle(3003); hMaxActiveDay[ig]->SetLineColor(kBlue); hMaxActiveWeek[ig]->SetLineColor(kBlue); hMaxActiveMonth[ig]->SetLineColor(kBlue); } for(int id=0; idSetStats(false); hActiveDayD[id]->GetXaxis()->SetLabelSize(0.06); hActiveDayD[id]->GetYaxis()->SetTitle("N. of movers"); hActiveDayD[id]->GetXaxis()->SetTitle("Time"); hActiveDayD[id]->GetYaxis()->SetLabelSize(0.04); hActiveDayD[id]->GetYaxis()->SetTitleSize(0.06); hActiveDayD[id]->GetYaxis()->SetTitleOffset(0.8); //hActiveDayD[id]->GetXaxis()->SetBinLabel(i+1,"now"); hActiveDayD[id]->GetXaxis()->LabelsOption("h"); hQueuedDayD[id]->SetStats(false); hQueuedDayD[id]->GetXaxis()->SetLabelSize(0.06); hQueuedDayD[id]->GetYaxis()->SetTitle("N. of movers"); hQueuedDayD[id]->GetXaxis()->SetTitle("Time"); hQueuedDayD[id]->GetYaxis()->SetLabelSize(0.04); hQueuedDayD[id]->GetYaxis()->SetTitleSize(0.06); hQueuedDayD[id]->GetYaxis()->SetTitleOffset(0.8); //hQueuedDayD[id]->GetXaxis()->SetBinLabel(i+1,"now"); hQueuedDayD[id]->GetXaxis()->LabelsOption("h"); hMaxActiveDayD[id]->SetStats(false); hMaxActiveDayD[id]->GetXaxis()->SetLabelSize(0.06); hMaxActiveDayD[id]->GetYaxis()->SetTitle("N. of movers"); hMaxActiveDayD[id]->GetXaxis()->SetTitle("Time"); hMaxActiveDayD[id]->GetYaxis()->SetLabelSize(0.04); hMaxActiveDayD[id]->GetYaxis()->SetTitleSize(0.06); hMaxActiveDayD[id]->GetYaxis()->SetTitleOffset(0.8); //hMaxActiveDayD[id]->GetXaxis()->SetBinLabel(i+1,"now"); hMaxActiveDayD[id]->GetXaxis()->LabelsOption("h"); hActiveWeekD[id]->SetStats(false); hActiveWeekD[id]->GetXaxis()->SetLabelSize(0.08); hActiveWeekD[id]->GetYaxis()->SetTitle("N. of movers"); hActiveWeekD[id]->GetXaxis()->SetTitle("Day"); hActiveWeekD[id]->GetYaxis()->SetLabelSize(0.06); hActiveWeekD[id]->GetYaxis()->SetTitleSize(0.06); hActiveWeekD[id]->GetYaxis()->SetTitleOffset(0.8); hActiveWeekD[id]->GetXaxis()->LabelsOption("h"); hQueuedWeekD[id]->SetStats(false); hQueuedWeekD[id]->GetXaxis()->SetLabelSize(0.08); hQueuedWeekD[id]->GetYaxis()->SetTitle("N. of movers"); hActiveWeekD[id]->GetXaxis()->SetTitle("Day"); hQueuedWeekD[id]->GetYaxis()->SetLabelSize(0.06); hQueuedWeekD[id]->GetYaxis()->SetTitleSize(0.06); hQueuedWeekD[id]->GetYaxis()->SetTitleOffset(0.8); hQueuedWeekD[id]->GetXaxis()->LabelsOption("h"); hMaxActiveWeekD[id]->SetStats(false); hMaxActiveWeekD[id]->GetXaxis()->SetLabelSize(0.08); hMaxActiveWeekD[id]->GetYaxis()->SetTitle("N. of movers"); hMaxActiveWeekD[id]->GetXaxis()->SetTitle("Day"); hMaxActiveWeekD[id]->GetYaxis()->SetLabelSize(0.06); hMaxActiveWeekD[id]->GetYaxis()->SetTitleSize(0.06); hMaxActiveWeekD[id]->GetYaxis()->SetTitleOffset(0.8); hMaxActiveWeekD[id]->GetXaxis()->LabelsOption("h"); hActiveMonthD[id]->SetStats(false); hActiveMonthD[id]->GetXaxis()->SetLabelSize(0.08); hActiveMonthD[id]->GetYaxis()->SetTitle("N. of movers"); hActiveMonthD[id]->GetXaxis()->SetTitle("Day"); hActiveMonthD[id]->GetYaxis()->SetLabelSize(0.06); hActiveMonthD[id]->GetYaxis()->SetTitleSize(0.06); hActiveMonthD[id]->GetYaxis()->SetTitleOffset(0.8); hActiveMonthD[id]->GetXaxis()->LabelsOption("h"); hQueuedMonthD[id]->SetStats(false); hQueuedMonthD[id]->GetXaxis()->SetLabelSize(0.08); hQueuedMonthD[id]->GetYaxis()->SetTitle("N. of movers"); hActiveMonthD[id]->GetXaxis()->SetTitle("Day"); hQueuedMonthD[id]->GetYaxis()->SetLabelSize(0.06); hQueuedMonthD[id]->GetYaxis()->SetTitleSize(0.06); hQueuedMonthD[id]->GetYaxis()->SetTitleOffset(0.8); hQueuedMonthD[id]->GetXaxis()->LabelsOption("h"); hMaxActiveMonthD[id]->SetStats(false); hMaxActiveMonthD[id]->GetXaxis()->SetLabelSize(0.08); hMaxActiveMonthD[id]->GetYaxis()->SetTitle("N. of movers"); hMaxActiveMonthD[id]->GetXaxis()->SetTitle("Day"); hMaxActiveMonthD[id]->GetYaxis()->SetLabelSize(0.06); hMaxActiveMonthD[id]->GetYaxis()->SetTitleSize(0.06); hMaxActiveMonthD[id]->GetYaxis()->SetTitleOffset(0.8); hMaxActiveMonthD[id]->GetXaxis()->LabelsOption("h"); hActiveDayD[id]->SetFillColor(kGreen); hActiveWeekD[id]->SetFillColor(kGreen); hActiveMonthD[id]->SetFillColor(kGreen); hQueuedDayD[id]->SetFillColor(kRed); hQueuedDayD[id]->SetFillStyle(3003); hQueuedWeekD[id]->SetFillColor(kRed); hQueuedWeekD[id]->SetFillStyle(3003); hQueuedMonthD[id]->SetFillColor(kRed); hQueuedMonthD[id]->SetFillStyle(3003); hMaxActiveDayD[id]->SetLineColor(kBlue); hMaxActiveWeekD[id]->SetLineColor(kBlue); hMaxActiveMonthD[id]->SetLineColor(kBlue); } char cName[40], cFileName[100]; TCanvas * cActiveD; TCanvas * cActiveWM; TText * txt; char label[200]; for(int ig=0; igSetGridy(); hActiveDay[ig]->SetMinimum(0); hActiveDay[ig]->SetMaximum(1.1*MAX(hActiveDay[ig]->GetBinContent(hActiveDay[ig]->GetMaximumBin()), hQueuedDay[ig]->GetBinContent(hQueuedDay[ig]->GetMaximumBin()))); hActiveDay[ig]->Draw(); hQueuedDay[ig]->Draw("SAME"); // hMaxActiveDay[ig]->Draw("SAME"); psFile = fHtmlDirectory + "/" + fGroups.fGroupName[ig] + "Queues_D.eps"; cActiveD->Print(psFile); gifFile = fHtmlDirectory + "/" + fGroups.fGroupName[ig] + "Queues_D.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cActiveD->Print(gifFile); } delete cActiveD; // week/month cActiveWM = new TCanvas("cActiveWM"); cActiveWM->Divide(1,2); cActiveWM->cd(1); gPad->SetGridy(); hActiveWeek[ig]->SetMinimum(0); hActiveWeek[ig]->SetMaximum(1.1*MAX(hActiveWeek[ig]->GetBinContent(hActiveWeek[ig]->GetMaximumBin()), hQueuedWeek[ig]->GetBinContent(hQueuedWeek[ig]->GetMaximumBin()))); hActiveWeek[ig]->Draw(); hQueuedWeek[ig]->Draw("SAME"); cActiveWM->cd(2); gPad->SetGridy(); hActiveMonth[ig]->SetMinimum(0); hActiveMonth[ig]->SetMaximum(1.1*MAX(hActiveMonth[ig]->GetBinContent(hActiveMonth[ig]->GetMaximumBin()), hQueuedMonth[ig]->GetBinContent(hQueuedMonth[ig]->GetMaximumBin()))); hActiveMonth[ig]->Draw(); hQueuedMonth[ig]->Draw("SAME"); psFile = fHtmlDirectory + "/" + fGroups.fGroupName[ig] + "Queues_WM.eps"; cActiveWM->Print(psFile); gifFile = fHtmlDirectory + "/" + fGroups.fGroupName[ig] + "Queues_WM.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cActiveWM->Print(gifFile); } delete cActiveWM; } ////////////////////// for(int id=0; idSetGridy(); hActiveDayD[id]->SetMinimum(0); hActiveDayD[id]->SetMaximum(1.1*MAX(hActiveDayD[id]->GetBinContent(hActiveDayD[id]->GetMaximumBin()), hQueuedDayD[id]->GetBinContent(hQueuedDayD[id]->GetMaximumBin()))); hActiveDayD[id]->Draw(); hQueuedDayD[id]->Draw("SAME"); // hMaxActiveDayD[id]->Draw("SAME"); psFile = fHtmlDirectory + "/" + fDomains.fDomainName[id] + "QD_D.eps"; cActiveD->Print(psFile); gifFile = fHtmlDirectory + "/" + fDomains.fDomainName[id] + "QD_D.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cActiveD->Print(gifFile); } delete cActiveD; // week/month cActiveWM = new TCanvas("cActiveWM"); cActiveWM->Divide(1,2); cActiveWM->cd(1); gPad->SetGridy(); hActiveWeekD[id]->SetMinimum(0); hActiveWeekD[id]->SetMaximum(1.1*MAX(hActiveWeekD[id]->GetBinContent(hActiveWeekD[id]->GetMaximumBin()), hQueuedWeekD[id]->GetBinContent(hQueuedWeekD[id]->GetMaximumBin()))); hActiveWeekD[id]->Draw(); hQueuedWeekD[id]->Draw("SAME"); cActiveWM->cd(2); gPad->SetGridy(); hActiveMonthD[id]->SetMinimum(0); hActiveMonthD[id]->SetMaximum(1.1*MAX(hActiveMonthD[id]->GetBinContent(hActiveMonthD[id]->GetMaximumBin()), hQueuedMonthD[id]->GetBinContent(hQueuedMonthD[id]->GetMaximumBin()))); hActiveMonthD[id]->Draw(); hQueuedMonthD[id]->Draw("SAME"); psFile = fHtmlDirectory + "/" + fDomains.fDomainName[id] + "QD_WM.eps"; cActiveWM->Print(psFile); gifFile = fHtmlDirectory + "/" + fDomains.fDomainName[id] + "QD_WM.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cActiveWM->Print(gifFile); } delete cActiveWM; } ////////////////// // Global plot cActiveD = new TCanvas("cActiveD"); cActiveD->SetGridy(); double maxval = 0; for(int ig = 1; igGetBinContent(hActiveDay[ig]->GetMaximumBin()), hQueuedDay[ig]->GetBinContent(hQueuedDay[ig]->GetMaximumBin())); hActiveDay[0]->SetMinimum(0); hActiveDay[0]->SetMaximum(maxval*1.1); hActiveDay[0]->SetFillColor(0); hActiveDay[0]->SetLineColor(colormap[0]); hActiveDay[0]->SetTitle("Active movers for each group vs time (TODAY)"); hActiveDay[0]->Draw(); hQueuedDay[0]->SetFillColor(0); hQueuedDay[0]->SetLineColor(colormap[0]); hQueuedDay[0]->SetLineStyle(2); hQueuedDay[0]->Draw("SAME"); for(int ig = 1; igSetFillColor(0); hActiveDay[ig]->SetLineColor(colormap[ig]); hActiveDay[ig]->Draw("SAME"); hQueuedDay[ig]->SetFillColor(0); hQueuedDay[ig]->SetLineColor(colormap[ig]); hQueuedDay[ig]->SetLineStyle(2); hQueuedDay[ig]->Draw("SAME"); } psFile = fHtmlDirectory + "/allQueues_D.eps"; cActiveD->Print(psFile); gifFile = fHtmlDirectory + "/allQueues_D.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cActiveD->Print(gifFile); } delete cActiveD; //////////////// cActiveD = new TCanvas("cActiveD"); cActiveD->SetGridy(); maxval = 0; for(int id = 1; idGetBinContent(hActiveDayD[id]->GetMaximumBin()), hQueuedDayD[id]->GetBinContent(hQueuedDayD[id]->GetMaximumBin())); hActiveDayD[0]->SetMinimum(0); hActiveDayD[0]->SetMaximum(maxval*1.1); hActiveDayD[0]->SetFillColor(0); hActiveDayD[0]->SetLineColor(colormap[0]); hActiveDayD[0]->SetTitle("Active movers for each domain vs time (TODAY)"); hActiveDayD[0]->Draw(); hQueuedDayD[0]->SetFillColor(0); hQueuedDayD[0]->SetLineColor(colormap[0]); hQueuedDayD[0]->SetLineStyle(2); hQueuedDayD[0]->Draw("SAME"); for(int id = 1; idSetFillColor(0); hActiveDayD[id]->SetLineColor(colormap[id]); hActiveDayD[id]->Draw("SAME"); hQueuedDayD[id]->SetFillColor(0); hQueuedDayD[id]->SetLineColor(colormap[id]); hQueuedDayD[id]->SetLineStyle(2); hQueuedDayD[id]->Draw("SAME"); } psFile = fHtmlDirectory + "/allQD_D.eps"; cActiveD->Print(psFile); gifFile = fHtmlDirectory + "/allQD_D.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cActiveD->Print(gifFile); } delete cActiveD; ////////////////// cActiveWM = new TCanvas("cActiveWM"); cActiveWM->Divide(1,2); cActiveWM->cd(1); gPad->SetGridy(); maxval = 0; for(int ig = 1; igGetBinContent(hActiveWeek[ig]->GetMaximumBin()), hQueuedWeek[ig]->GetBinContent(hQueuedWeek[ig]->GetMaximumBin())); hActiveWeek[0]->SetMinimum(0); hActiveWeek[0]->SetMaximum(maxval*1.1); hActiveWeek[0]->SetFillColor(0); hActiveWeek[0]->SetLineColor(colormap[0]); hActiveWeek[0]->SetTitle("Active movers for each group vs time (LAST 7 DAYS)"); hActiveWeek[0]->Draw(); hQueuedWeek[0]->SetFillColor(0); hQueuedWeek[0]->SetLineColor(colormap[0]); hQueuedWeek[0]->SetLineStyle(2); hQueuedWeek[0]->Draw("SAME"); for(int ig = 1; igSetFillColor(0); hActiveWeek[ig]->SetLineColor(colormap[ig]); hActiveWeek[ig]->Draw("SAME"); hQueuedWeek[ig]->SetFillColor(0); hQueuedWeek[ig]->SetLineColor(colormap[ig]); hQueuedWeek[ig]->SetLineStyle(2); hQueuedWeek[ig]->Draw("SAME"); } cActiveWM->cd(2); gPad->SetGridy(); maxval = 0; for(int ig = 1; igGetBinContent(hActiveMonth[ig]->GetMaximumBin()), hQueuedMonth[ig]->GetBinContent(hQueuedMonth[ig]->GetMaximumBin())); hActiveMonth[0]->SetMinimum(0); hActiveMonth[0]->SetMaximum(maxval*1.1); hActiveMonth[0]->SetFillColor(0); hActiveMonth[0]->SetLineColor(colormap[0]); hActiveMonth[0]->SetTitle("Active movers for each group vs time (LAST 31 DAYS)"); hActiveMonth[0]->Draw(); hQueuedMonth[0]->SetFillColor(0); hQueuedMonth[0]->SetLineColor(colormap[0]); hQueuedMonth[0]->SetLineStyle(2); hQueuedMonth[0]->Draw("SAME"); for(int ig = 1; igSetFillColor(0); hActiveMonth[ig]->SetLineColor(colormap[ig]); hActiveMonth[ig]->Draw("SAME"); hQueuedMonth[ig]->SetFillColor(0); hQueuedMonth[ig]->SetLineColor(colormap[ig]); hQueuedMonth[ig]->SetLineStyle(2); hQueuedMonth[ig]->Draw("SAME"); } psFile = fHtmlDirectory + "/allQueues_WM.eps"; cActiveWM->Print(psFile); gifFile = fHtmlDirectory + "/allQueues_WM.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cActiveD->Print(gifFile); } delete cActiveWM; ////////////////// cActiveWM = new TCanvas("cActiveWM"); cActiveWM->Divide(1,2); cActiveWM->cd(1); gPad->SetGridy(); maxval = 0; for(int id = 1; idGetBinContent(hActiveWeekD[id]->GetMaximumBin()), hQueuedWeekD[id]->GetBinContent(hQueuedWeekD[id]->GetMaximumBin())); hActiveWeekD[0]->SetMinimum(0); hActiveWeekD[0]->SetMaximum(maxval*1.1); hActiveWeekD[0]->SetFillColor(0); hActiveWeekD[0]->SetLineColor(colormap[0]); hActiveWeekD[0]->SetTitle("Active movers for each domain vs time (LAST 7 DAYS)"); hActiveWeekD[0]->Draw(); hQueuedWeekD[0]->SetFillColor(0); hQueuedWeekD[0]->SetLineColor(colormap[0]); hQueuedWeekD[0]->SetLineStyle(2); hQueuedWeekD[0]->Draw("SAME"); for(int id = 1; idSetFillColor(0); hActiveWeekD[id]->SetLineColor(colormap[id]); hActiveWeekD[id]->Draw("SAME"); hQueuedWeekD[id]->SetFillColor(0); hQueuedWeekD[id]->SetLineColor(colormap[id]); hQueuedWeekD[id]->SetLineStyle(2); hQueuedWeekD[id]->Draw("SAME"); } cActiveWM->cd(2); gPad->SetGridy(); maxval = 0; for(int id = 1; idGetBinContent(hActiveMonthD[id]->GetMaximumBin()), hQueuedMonthD[id]->GetBinContent(hQueuedMonthD[id]->GetMaximumBin())); hActiveMonthD[0]->SetMinimum(0); hActiveMonthD[0]->SetMaximum(maxval*1.1); hActiveMonthD[0]->SetFillColor(0); hActiveMonthD[0]->SetLineColor(colormap[0]); hActiveMonthD[0]->SetTitle("Active movers for each domain vs time (LAST 31 DAYS)"); hActiveMonthD[0]->Draw(); hQueuedMonthD[0]->SetFillColor(0); hQueuedMonthD[0]->SetLineColor(colormap[0]); hQueuedMonthD[0]->SetLineStyle(2); hQueuedMonthD[0]->Draw("SAME"); for(int id = 1; idSetFillColor(0); hActiveMonthD[id]->SetLineColor(colormap[id]); hActiveMonthD[id]->Draw("SAME"); hQueuedMonthD[id]->SetFillColor(0); hQueuedMonthD[id]->SetLineColor(colormap[id]); hQueuedMonthD[id]->SetLineStyle(2); hQueuedMonthD[id]->Draw("SAME"); } psFile = fHtmlDirectory + "/allQD_WM.eps"; cActiveWM->Print(psFile); gifFile = fHtmlDirectory + "/allQD_WM.gif"; if (gROOT->IsBatch()) { sprintf(command,"pstopnm -ppm -xborder 0 -yborder 0 -portrait %s", psFile.Data()); gSystem->Exec(command); sprintf(command,"ppmtogif %s001.ppm > %s", psFile.Data(), gifFile.Data()); gSystem->Exec(command); sprintf(command,"rm -f %s001.ppm", psFile.Data()); gSystem->Exec(command); } else { cActiveD->Print(gifFile); } delete cActiveWM; ///////////////// printf(" end TDCacheQueuesMonitor::MakePlots()\n"); return 0; } //_____________________________________________________________________________ int TDCacheQueuesMonitor::MakeHtml(const char* HtmlFile) { printf(" inside TDCacheQueuesMonitor::MakeHtml()\n"); return 0; }