ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/MitPlots/Input/interface/TaskSamples.h
Revision: 1.3
Committed: Wed Mar 28 12:10:21 2012 UTC (13 years, 1 month ago) by paus
Content type: text/plain
Branch: MAIN
CVS Tags: Mit_029a, Mit_028, Mit_027, Mit_027a, HEAD
Changes since 1.2: +26 -27 lines
Log Message:
Small tweaks.

File Contents

# Content
1 //--------------------------------------------------------------------------------------------------
2 // $Id: TaskSamples.h,v 1.2 2011/01/25 14:24:52 fabstoec Exp $
3 //
4 // TaskSamples
5 //
6 // This class implements TaskSamples which fundamentally is a collection of samples used in a given
7 // analysis task. The data sample is not part of the list but is stored separately.
8 //
9 // This class manages the data and list of Monte Carlo samples for plotting etc.
10 //
11 // Authors: C.Paus
12 //--------------------------------------------------------------------------------------------------
13 #ifndef MITPLOTS_INPUT_TASKSAMPLES_H
14 #define MITPLOTS_INPUT_TASKSAMPLES_H
15
16 #include <vector>
17 #include <TString.h>
18 #include "MitPlots/Input/interface/Sample.h"
19
20 namespace mithep
21 {
22 class TaskSamples
23 {
24 public:
25 TaskSamples(const char* name, const char* dir);
26 ~TaskSamples() { }
27
28 const TString *Name () const { return &fName; }
29 const TString *NameTxt () const { return &fNameTxt; }
30 void SetNameTxt(const char* n) { fNameTxt = TString(n); }
31 const TString *Dir () const { return &fDir; }
32 void Show () const; // show list of task samples
33 const UInt_t *NSamples () const { return &fNMcSamples; }
34 const UInt_t *NDataSamples() const { return &fNDataSamples; }
35 const Sample *GetSample(UInt_t i) const; // return 'i'th Monte Carlo sample
36 const Sample *GetDataSample(UInt_t i) const; // return 'i'th data sample
37
38 private:
39 Sample *AddDataSample(const char* name, const char* skimName, const char* file);
40 Sample *AddSample (const char* name, const char* skimName, const char* file,
41 double xsec, double scale);
42 void ReadFile (const char* dir);
43
44 TString fName; // location of production
45 TString fNameTxt; // location of configuration (usually same as prod.)
46 TString fDir; // directory with sample files (sample can overwrite)
47
48 UInt_t fNMcSamples; // number of MC samples
49 UInt_t fNDataSamples; // number of data samples
50 std::vector<Sample> fMcSamples; // list of files contained in the fileset
51 std::vector<Sample> fDataSamples; // data sample (not part of the list
52
53 ClassDef(TaskSamples, 0) // TaskSamples manages a list of samples used in an analysis task
54 };
55 }
56 #endif