otsdaq  v2_01_00
DQMHistosOuterTracker.cc
1 #include "otsdaq-core/RootUtilities/DQMHistosOuterTracker.h"
2 #include "otsdaq-core/DataDecoders/FSSRData.h"
3 #include "otsdaq-core/DataDecoders/VIPICData.h"
4 #include "otsdaq-core/NetworkUtilities/NetworkConverters.h"
5 #include "otsdaq-core/ConfigurationInterface/ConfigurationManager.h"
6 
7 #include "otsdaq-core/ConfigurationPluginDataFormats/DetectorConfiguration.h"
8 #include "otsdaq-core/ConfigurationPluginDataFormats/FEConfiguration.h"
9 #include "otsdaq-core/ConfigurationPluginDataFormats/DetectorToFEConfiguration.h"
10 #include "otsdaq-core/ConfigurationPluginDataFormats/DataManagerConfiguration.h"
11 #include "otsdaq-core/ConfigurationPluginDataFormats/DataBufferConfiguration.h"
12 #include "otsdaq-core/ConfigurationPluginDataFormats/UDPDataStreamerConsumerConfiguration.h"
13 #include "otsdaq-core/ConfigurationPluginDataFormats/UDPDataListenerProducerConfiguration.h"
14 #include "otsdaq-core/ConfigurationDataFormats/FEInterfaceConfigurationBase.h"
15 //#include "otsdaq-demo/UserConfigurationDataFormats/FEWROtsUDPFSSRInterfaceConfiguration.h"
16 //#include "otsdaq-demo/UserConfigurationDataFormats/FEWRPurdueFSSRInterfaceConfiguration.h"
17 
18 #include <iostream>
19 #include <string>
20 #include <sstream>
21 
22 #include <TH1.h>
23 #include <TH2.h>
24 #include <TH1F.h>
25 #include <TH2F.h>
26 #include <TProfile.h>
27 #include <TCanvas.h>
28 #include <TFrame.h>
29 #include <TRandom.h>
30 #include <TThread.h>
31 #include <TROOT.h>
32 #include <TDirectory.h>
33 #include <TFile.h>
34 #include <TStyle.h>
35 
36 #include <stdint.h>
37 //#include <arpa/inet.h>
38 
39 //ROOT documentation
40 //http://root.cern.ch/root/html/index.html
41 
42 using namespace ots;
43 
44 
45 //========================================================================================================================
46 DQMHistosOuterTracker::DQMHistosOuterTracker(std::string supervisorApplicationUID, std::string bufferUID, std::string processorUID)
47 : theFile_ (0)
48 , theDataDecoder_ (supervisorApplicationUID, bufferUID, processorUID)
49 , supervisorApplicationUID_(supervisorApplicationUID)
50 , bufferUID_ (bufferUID)
51 , processorUID_ (processorUID)
52 {
53  gStyle->SetPalette(1);
54 }
55 
56 //========================================================================================================================
57 DQMHistosOuterTracker::~DQMHistosOuterTracker(void)
58 {
59  closeFile();
60 }
61 
62 //========================================================================================================================
63 void DQMHistosOuterTracker::openFile (std::string fileName)
64 {
65  closeFile();
66  currentDirectory_ = 0;
67  theFile_ = TFile::Open(fileName.c_str(), "RECREATE");
68  theFile_->cd();
69 
70 }
71 
72 //========================================================================================================================
73 void DQMHistosOuterTracker::book()
74 {
75  std::cout << __COUT_HDR_FL__ << "Booking start!" << std::endl;
76 
77  currentDirectory_ = theFile_->mkdir("General", "General");
78  currentDirectory_->cd();
79  numberOfTriggers_ = new TH1I("NumberOfTriggers", "Number of triggers", 1, -0.5, 0.5);
80  currentDirectory_ = theFile_->mkdir("Planes", "Planes");
81  currentDirectory_->cd();
82  std::stringstream name;
83  std::stringstream title;
84  //FIXME
85  const FEConfiguration* feConfiguration = theConfigurationManager_->__GET_CONFIG__(FEConfiguration);
86  const DetectorToFEConfiguration* detectorToFEConfiguration = theConfigurationManager_->__GET_CONFIG__(DetectorToFEConfiguration);
87  const DataManagerConfiguration* dataManagerConfiguration = theConfigurationManager_->__GET_CONFIG__(DataManagerConfiguration);
88  const DataBufferConfiguration* dataBufferConfiguration = theConfigurationManager_->__GET_CONFIG__(DataBufferConfiguration);
89  const UDPDataStreamerConsumerConfiguration* dataStreamerConsumerConfiguration = theConfigurationManager_->__GET_CONFIG__(UDPDataStreamerConsumerConfiguration);
90  const DetectorConfiguration* detectorConfiguration = theConfigurationManager_->__GET_CONFIG__(DetectorConfiguration);
91 
92  // const std::string supervisorType_;
93  // const unsigned int supervisorInstance_;
94  // const unsigned int bufferUID_;
95  // const std::string processorUID_;
96 
97 
98  std::stringstream processName;
99  std::vector<std::string> bufferList = dataManagerConfiguration->getListOfDataBuffers();
100  std::vector<std::string> interfaceList = feConfiguration->getListOfFEIDs();
101  for(const auto& itInterfaces: interfaceList)
102  {
103  std::string streamToIP;
104  std::string streamToPort;
105 
106  //RAR -- on June 28
107  // Eric changed this to Base.. but this functionality does not belong in ConfiguraitonBase
108  // If LORE wants this functionality then move to otsdaq_demo repository since it depends on
109  // interfaces in demo (Or think about how to extract this dependency?.. should there be an
110  // intermediate class that interfaces have to inherit from to have DQM functionality?)
111  if(feConfiguration->getFEInterfaceType(itInterfaces).find("FSSRInterface") != std::string::npos)
112  {
113  const ConfigurationBase* interfaceConfiguration = theConfigurationManager_->getConfigurationByName(feConfiguration->getFEInterfaceType(itInterfaces)+"Configuration");
114  auto feinterfaceConfiguration = dynamic_cast<const FEInterfaceConfigurationBase*>(interfaceConfiguration);
115  if(feinterfaceConfiguration) {
116  streamToIP = feinterfaceConfiguration->getStreamingIPAddress(itInterfaces);
117  streamToPort = feinterfaceConfiguration->getStreamingPort(itInterfaces);
118  }
119  }
120 
121  for(const auto& itBuffers: bufferList)
122  {
123  std::vector<std::string> producerList = dataBufferConfiguration->getProducerIDList(itBuffers);
124  std::vector<std::string> consumerList = dataBufferConfiguration->getConsumerIDList(itBuffers);
125  for(const auto& itProducers: producerList)
126  {
127  if(dataBufferConfiguration->getProducerClass(itBuffers,itProducers) == "UDPDataListenerProducer")
128  {
129  const UDPDataListenerProducerConfiguration* listerConfiguration = static_cast<const UDPDataListenerProducerConfiguration*>(theConfigurationManager_->getConfigurationByName("UDPDataListenerProducerConfiguration"));
130  if(listerConfiguration->getIPAddress(itProducers) == streamToIP && listerConfiguration->getPort(itProducers) == streamToPort)
131  {
132  for(const auto& itConsumers: consumerList)
133  {
134  std::cout << __COUT_HDR_FL__ << "CONSUMER LIST: " << itConsumers << std::endl;
135  if(dataBufferConfiguration->getConsumerClass(itBuffers,itConsumers) == "UDPDataStreamerConsumer")
136  {
137  //FIXME This is very bad since I am getting the PC IP Hardcoded!!!!!!!
138  std::string ipAddress = NetworkConverters::nameToStringIP(dataStreamerConsumerConfiguration->getIPAddress(itConsumers));
139  //FIXME the streamer should have it's own configured port and not fedport +1
140  std::string port = NetworkConverters::unsignedToStringPort(dataStreamerConsumerConfiguration->getPort(itConsumers));
141  planeOccupancies_[ipAddress][port] = std::map<unsigned int, TH1*>();
142  std::cout << __COUT_HDR_FL__ << "IP: " << NetworkConverters::stringToNameIP(ipAddress) << " Port:----" << NetworkConverters::stringToUnsignedPort(port) << "----" << std::endl;
143  const std::vector<std::string> rocList = detectorToFEConfiguration->getFEReaderDetectorList(itInterfaces);
144  std::cout << __COUT_HDR_FL__ << "List of rocs for FER: " << itInterfaces << " has size: " << rocList.size() << std::endl;
145  for(const auto& itROC: rocList)
146  {
147  std::string ROCType = detectorConfiguration->getDetectorType(itROC);
148  //std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << "ROC type: " << ROCType << std::endl;
149  if(ROCType == "FSSR")
150  {
151  unsigned int fedChannel = detectorToFEConfiguration->getFEReaderChannel(itROC);
152  if(planeOccupancies_[ipAddress][port].find(fedChannel) == planeOccupancies_[ipAddress][port].end())
153  {
154  name.str("");
155  title.str("");
156  name << "Plane_FE" << itInterfaces << "_Channel"<< fedChannel << "_Occupancy";
157  title << "Plane FE" << itInterfaces << " Channel"<< fedChannel << " Occupancy";
158  std::cout << __COUT_HDR_FL__ << "Adding:" << name.str() << std::endl;
159  planeOccupancies_[ipAddress][port][fedChannel] = new TH1F(name.str().c_str(), title.str().c_str(), 640, -0.5, 639.5);
160  }
161  }
162  }
163  }
164  }
165  }
166  }
167  }
168  }
169  }
170  /*
171  for(const auto& it: consumerList)
172  {
173  std::cout << __COUT_HDR_FL__ << "CONSUMER LIST: " << it << std::endl;
174  if((dataBufferConfiguration->getConsumerClass(itBuffers,it) == "UDPDataStreamerConsumer") && (it.find("Purdue") != std::string::npos || it.find("OtsUDP") != std::string::npos))
175  {
176  //FIXME This is very bad since I am getting the PC IP Hardcoded!!!!!!!
177  std::string ipAddress = NetworkConverters::nameToStringIP(dataStreamerConsumerConfiguration->getIPAddress(it));
178  //FIXME the streamer should have it's own configured port and not fedport +1
179  std::string port = NetworkConverters::unsignedToStringPort(dataStreamerConsumerConfiguration->getPort(it));
180  planeOccupancies_[ipAddress][port] = std::map<unsigned int, TH1*);
181  std::cout << __COUT_HDR_FL__ << "IP: " << NetworkConverters::stringToNameIP(ipAddress) << " Port:----" << NetworkConverters::stringToUnsignedPort(port) << "----" << std::endl;
182  std::vector<std::string> interfaceList = feConfiguration->getListOfFEIDs();
183  for(const auto& it: interfaceList)
184  {
185  std::cout << __COUT_HDR_FL__ << "Configuring histos for FER: " << it << std::endl;
186  if(feConfiguration->getFEInterfaceType(it).find( "FSSRInterface" ) != std::string::npos)
187  {
188  //const OtsUDPFERConfiguration* OtsUDPFERConfiguration = theConfigurationManager_->__GET_CONFIG__(OtsUDPFERConfiguration);
189  const std::vector<std::string> rocList = DetectorToFEConfiguration->getFERROCsList(it);
190  std::cout << __COUT_HDR_FL__ << "List of rocs for FER: " << it << " has size: " << rocList.size() << std::endl;
191  for(const auto& itROC: rocList)
192  {
193  std::string ROCType = detectorConfiguration->getROCType(itROC);
194  //std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << "ROC type: " << ROCType << std::endl;
195  if(ROCType == "FSSR")
196  {
197  unsigned int fedChannel = DetectorToFEConfiguration->getFERChannel(itROC);
198  if(planeOccupancies_[ipAddress][port].find(fedChannel) == planeOccupancies_[ipAddress][port].end())
199  {
200  name.str("");
201  title.str("");
202  name << "Plane_FE" << it << "_Channel"<< fedChannel << "_Occupancy";
203  title << "Plane FE" << it << " Channel"<< fedChannel << " Occupancy";
204  std::cout << __COUT_HDR_FL__ << "Adding:" << name.str() << std::endl;
205  planeOccupancies_[ipAddress][port][fedChannel] = new TH1F(name.str().c_str(), title.str().c_str(), 640, -0.5, 639.5);
206  }
207  }
208  else if (ROCType == "VIPIC")
209  {
210  unsigned int fedChannel = DetectorToFEConfiguration->getFERChannel(itROC);
211  if(planeOccupancies_[ipAddress][port].find(fedChannel) == planeOccupancies_[ipAddress][port].end())
212  {
213  name.str("");
214  title.str("");
215  name << "Plane_FER" << it << "_Channel"<< fedChannel << "_Occupancy";
216  title << "Plane FER" << it << " Channel"<< fedChannel << " Occupancy";
217  std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << "Adding:" << name << std::endl;
218  planeOccupancies_[ipAddress][port][fedChannel] = new TH2F(name.str().c_str(), title.str().c_str(), 64, -0.5, 63.5, 64, -0.5, 63.5);
219  }
220  }
221  }
222  }
223  }
224  }
225 
226  }
227 }
228  */
229  std::cout << __COUT_HDR_FL__ << "Booking done!" << std::endl;
230  /*
231  for(unsigned int p=0; p<4; p++)
232  {
233  name.str("");
234  title.str("");
235  name << "Plane_" << p << "_Occupancy";
236  title << "Plane " << p << " Occupancy";
237  planeOccupancies_.push_back(new TH1I(name.str().c_str(), title.str().c_str(), 640, 0, 640));
238  }
239  */
240 
241  // Create a new canvas
242  //canvas_ = new TCanvas("MainCanvas", "Main Canvas", 200, 10, 700, 500);
243  //canvas_->SetFillColor(42);
244  //canvas_->GetFrame()->SetFillColor(21);
245  //canvas_->GetFrame()->SetBorderSize(6);
246  //canvas_->GetFrame()->SetBorderMode(-1);
247  //directory_->Append(canvas_);
248 
249  // Create a 1-D, 2-D and a profile histogram
250  //histo1D_ = new TH1F("Histo1D", "This is the px distribution", 100, -4, 4);
251  //histo2D_ = new TH2F("Histo2D", "py vs px", 40, -4, 4, 40, -4, 4);
252  //profile_ = new TProfile("Profile", "Profile of pz versus px", 100, -4, 4, 0, 20);
253  // gDirectory->ls();
254 
255  // Set canvas/frame attributes (save old attributes)
256  //histo1D_->SetFillColor(48);
257 
258  // gROOT->cd();
259 }
260 
261 //========================================================================================================================
262 void DQMHistosOuterTracker::fill(std::string& buffer, std::map<std::string, std::string> header)
263 {
264 
265  //std::cout << __COUT_HDR_FL__ << buffer.length() << std::endl;
266  //int triggerNumber = 0;
267  //int triggerHigh = 0;
268  //int triggerLow = 0;
269  //unsigned long ipAddress = (((header["IPAddress"][0]&0xff)<<24) + ((header["IPAddress"][1]&0xff)<<16) + ((header["IPAddress"][2]&0xff)<<8) + (header["IPAddress"][3]&0xff)) & 0xffffffff;
270  std::string ipAddress = header["IPAddress"];
271  std::string port = header["Port"];
272 
273  //std::cout << __COUT_HDR_FL__ << "Got data from IP: " << NetworkConverters::stringToNameIP(ipAddress) << " port: " << NetworkConverters::stringToUnsignedPort(port) << std::endl;
274 
275  if (NetworkConverters::stringToUnsignedPort(port) == 48003)
276  theDataDecoder_.convertBuffer(buffer, convertedBuffer_, false);
277  else
278  theDataDecoder_.convertBuffer(buffer, convertedBuffer_, true);
279  //std::cout << __COUT_HDR_FL__ << "New buffer" << std::endl;
280  unsigned int bufferCounter = 0;
281  uint32_t oldData = 0;
282  while (!convertedBuffer_.empty())
283  {
284  //if (!theDataDecoder_.isBCOHigh(convertedBuffer_.front())
285  // && !theDataDecoder_.isBCOLow(convertedBuffer_.front())
286  // && !theDataDecoder_.isTrigger(convertedBuffer_.front()))
287 
288  if (NetworkConverters::stringToUnsignedPort(port) == 48003 && bufferCounter%2 == 1)
289  {
290  convertedBuffer_.pop();
291  bufferCounter++;
292  continue;
293  }
294  //if (NetworkConverters::stringToUnsignedPort(port) == 48003 && bufferCounter%2 == 0)
295  // std::cout << __COUT_HDR_FL__ << "Data: " << std::hex << convertedBuffer_.front() << std::dec << std::endl;
296  if (theDataDecoder_.isFSSRData(convertedBuffer_.front()))
297  {
298 
299  // if(oldData != 0 && oldData==convertedBuffer_.front())
300  // std::cout << __COUT_HDR_FL__ << "There is a copy FSSR: " << std::hex << convertedBuffer_.front() << " counter: " << bufferCounter << std::dec << std::endl;
301  oldData = convertedBuffer_.front();
302  FSSRData* detectorDataFSSR = 0;
303  theDataDecoder_.decodeData(convertedBuffer_.front(), (DetectorDataBase**)&detectorDataFSSR);
304  //if(detectorData->getChannelNumber() >= 4)
305  //{
306  // std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << "Wrong channel: " << detectorData->getChannelNumber() << std::endl;
307  // return;
308  //}
309  //std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << "Receiving data from: " << hex << ipAddress << " port: " << port << std::endl;
310  if( planeOccupancies_.find(ipAddress) != planeOccupancies_.end()
311  && planeOccupancies_[ipAddress].find(port) != planeOccupancies_[ipAddress].end()
312  && planeOccupancies_[ipAddress][port].find(detectorDataFSSR->getChannelNumber()) != planeOccupancies_[ipAddress][port].end())
313  planeOccupancies_[ipAddress][port][detectorDataFSSR->getChannelNumber()]->Fill(detectorDataFSSR->getSensorStrip());
314  else
315  std::cout << __COUT_HDR_FL__
316  << "ERROR: I haven't book histos for streamer " << NetworkConverters::stringToNameIP(ipAddress)
317  << " port number: " << NetworkConverters::stringToUnsignedPort(port)
318  << " channel: " << detectorDataFSSR->getChannelNumber()
319  << " data: " << std::hex << convertedBuffer_.front() << std::dec
320  << std::endl;
321  // }
322  //std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << processorUID_ << " filling histograms!" << std::endl;
323  // Float_t px, py, pz;
324  // const Int_t kUPDATE = 1000;
325  // std::cout << __COUT_HDR_FL__ << mthn << "Filling..." << std::endl;
326  /*
327  for (Int_t i = 1; i <= 1000; i++)
328  {
329  gRandom->Rannor(px, py);
330  pz = px * px + py * py;
331  histo1D_->Fill(px);
332  histo2D_->Fill(px, py);
333  profile_->Fill(px, pz);
334  }
335  */
336  }
337  // if (theDataDecoder_.isVIPICData(convertedBuffer_.front()))
338  // {
339  // VIPICData* detectorDataVIPIC = 0;
340  // theDataDecoder_.decodeData(convertedBuffer_.front(), (DetectorDataBase**)&detectorDataVIPIC);
341  // //if(detectorData->getChannelNumber() >= 4)
342  // //{
343  // // std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << "Wrong channel: " << detectorData->getChannelNumber() << std::endl;
344  // // return;
345  // //}
346  // //std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << "Receiving data from: " << hex << ipAddress << " port: " << port << std::endl;
347  // if (
348  // planeOccupancies_.find(ipAddress) != planeOccupancies_.end()
349  // && planeOccupancies_[ipAddress].find(port) != planeOccupancies_[ipAddress].end()
350  // && planeOccupancies_[ipAddress][port].find(detectorDataVIPIC->getChannelNumber()) != planeOccupancies_[ipAddress][port].end()
351  // )
352  // planeOccupancies_[ipAddress][port][detectorDataVIPIC->getChannelNumber()]->Fill(detectorDataVIPIC->getCol(), detectorDataVIPIC->getRow());
353  // else
354  // std::cout << __COUT_HDR_FL__ << "ERROR: I haven't book histos for streamer " << NetworkConverters::stringToNameIP(ipAddress)
355  // << " port number: " << NetworkConverters::stringToUnsignedPort(port)
356  // << " port std::string:----" << port << "-----"
357  // << " channel: " << detectorDataVIPIC->getChannelNumber() << std::endl;
358  // // }
359  // //std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << processorUID_ << " filling histograms!" << std::endl;
360  // // Float_t px, py, pz;
361  // // const Int_t kUPDATE = 1000;
362  // // std::cout << __COUT_HDR_FL__ << mthn << "Filling..." << std::endl;
363  // /*
364  // for (Int_t i = 1; i <= 1000; i++)
365  // {
366  // gRandom->Rannor(px, py);
367  // pz = px * px + py * py;
368  // histo1D_->Fill(px);
369  // histo2D_->Fill(px, py);
370  // profile_->Fill(px, pz);
371  // }
372  // */
373  // }
374 
375  /*
376  else if (theDataDecoder_.isTriggerLow(convertedBuffer_.front()))
377  triggerLow = convertedBuffer_.front();
378  else if (theDataDecoder_.isTriggerHigh(convertedBuffer_.front()))
379  {
380  triggerHigh = convertedBuffer_.front();
381  triggerNumber = theDataDecoder_.mergeTriggerHighAndLow(triggerHigh,triggerLow);
382  numberOfTriggers_->Fill(0);
383  //std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << "Number of Triggers: " << triggerNumber << std::endl;
384  //if(triggerNumber != numberOfTriggers_->GetEntries())
385  // std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << "---------------------------- ERROR: different trigger number " << triggerNumber << " entries: " << numberOfTriggers_->GetEntries() << std::endl;
386  }
387  */
388  convertedBuffer_.pop();
389  bufferCounter++;
390  }
391  /*
392  std::cout << __COUT_HDR_FL__ << "base: " << typeid(detectorData).name()
393  << "=" << typeid(FSSRData*).name()
394  << " d cast: " << dynamic_cast<FSSRData*>(detectorData)
395  << " r cast: " << static_cast<FSSRData*>(detectorData)
396  << std::endl;
397  if (dynamic_cast<FSSRData*>(detectorData) != 0)
398  {
399  FSSRData* data = (FSSRData*)detectorData;
400  */
401  // std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << "Strip: " << std::endl;
402  // std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << "Strip: " << detectorData->getStripNumber() << std::endl;
403  //std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << "Strip: " << detectorData->getChannelNumber() << std::endl;
404 }
405 
406 //========================================================================================================================
407 void DQMHistosOuterTracker::save(void)
408 {
409  std::cout << __COUT_HDR_FL__ << __PRETTY_FUNCTION__ << "Saving file!" << std::endl;
410  if (theFile_ != 0)
411  theFile_->Write();
412 }
413 
414 //========================================================================================================================
415 void DQMHistosOuterTracker::load(std::string fileName)
416 {
417  closeFile();
418  theFile_ = TFile::Open(fileName.c_str());//WebPath/js/visualizers_lib/tmpRootData/Suca.root");
419  if (!theFile_->IsOpen())
420  return;
421  theFile_->cd();
422  numberOfTriggers_ = (TH1I*)theFile_->Get("General/NumberOfTriggers");
423 
424  std::string directory = "Planes";
425  std::stringstream name;
426  for(unsigned int p=0; p<4; p++)
427  {
428  name.str("");
429  name << directory << "/Plane_" << p << "_Occupancy";
430  //FIXME Must organize better all histograms!!!!!
431  //planeOccupancies_.push_back((TH1I*)theFile_->Get(name.str().c_str()));
432  }
433  //canvas_ = (TCanvas*) theFile_->Get("MainDirectory/MainCanvas");
434  //histo1D_ = (TH1F*) theFile_->Get("MainDirectory/Histo1D");
435  //histo2D_ = (TH2F*) theFile_->Get("MainDirectory/Histo2D");
436  //profile_ = (TProfile*) theFile_->Get("MainDirectory/Profile");
437  closeFile();
438 }
439 
440 //========================================================================================================================
441 void DQMHistosOuterTracker::closeFile(void)
442 {
443  if (theFile_ != 0)
444  {
445  theFile_->Close();
446  theFile_ = 0;
447  }
448 }
449 
450 //========================================================================================================================
451 TObject* DQMHistosOuterTracker::get(std::string name)
452 {
453  if (theFile_ != 0)
454  return theFile_->Get(name.c_str());
455  return 0;
456 }