CMS 3D CMS Logo

GEMValidationUtils.cc
Go to the documentation of this file.
2 
3 #include "TString.h"
4 
5 TString GEMUtils::getSuffixName(Int_t region_id) { return TString::Format("_re%d", region_id); }
6 
7 TString GEMUtils::getSuffixName(Int_t region_id, Int_t station_id) {
8  return TString::Format("_re%d_st%d", region_id, station_id);
9 }
10 
11 TString GEMUtils::getSuffixName(Int_t region_id, Int_t station_id, Int_t layer_id) {
12  return TString::Format("_re%d_st%d_la%d", region_id, station_id, layer_id);
13 }
14 
15 TString GEMUtils::getSuffixName(Int_t region_id, Int_t station_id, Int_t layer_id, Int_t roll_id) {
16  return TString::Format("_re%d_st%d_la%d_ro%d", region_id, station_id, layer_id, roll_id);
17 }
18 
20  auto [region_id, station_id] = key;
21  return getSuffixName(region_id, station_id);
22 }
23 
25  auto [region_id, station_id, layer_id] = key;
26  return getSuffixName(region_id, station_id, layer_id);
27 }
28 
30  auto [region_id, station_id, layer_id, roll_id] = key;
31  return getSuffixName(region_id, station_id, layer_id, roll_id);
32 }
33 
34 TString GEMUtils::getSuffixTitle(Int_t region_id) { return TString::Format(" Region %d", region_id); }
35 
36 TString GEMUtils::getSuffixTitle(Int_t region_id, Int_t station_id) {
37  return TString::Format(" Region %d Station %d", region_id, station_id);
38 }
39 
40 TString GEMUtils::getSuffixTitle(Int_t region_id, Int_t station_id, Int_t layer_id) {
41  return TString::Format(" Region %d Station %d Layer %d", region_id, station_id, layer_id);
42 }
43 
44 TString GEMUtils::getSuffixTitle(Int_t region_id, Int_t station_id, Int_t layer_id, Int_t roll_id) {
45  return TString::Format(" Region %d Station %d Layer %d Roll %d", region_id, station_id, layer_id, roll_id);
46 }
47 
49  auto [region_id, station_id] = key;
50  return getSuffixTitle(region_id, station_id);
51 }
52 
54  auto [region_id, station_id, layer_id] = key;
55  return getSuffixTitle(region_id, station_id, layer_id);
56 }
57 
59  auto [region_id, station_id, layer_id, roll_id] = key;
60  return getSuffixTitle(region_id, station_id, layer_id, roll_id);
61 }
ME2IdsKey
std::tuple< Int_t, Int_t > ME2IdsKey
Definition: GEMValidationUtils.h:16
ME4IdsKey
std::tuple< Int_t, Int_t, Int_t, Int_t > ME4IdsKey
Definition: GEMValidationUtils.h:20
GEMUtils::getSuffixName
TString getSuffixName(Int_t region_id)
Definition: GEMValidationUtils.cc:5
GEMValidationUtils.h
GEMUtils::getSuffixTitle
TString getSuffixTitle(Int_t region_id)
Definition: GEMValidationUtils.cc:34
ME3IdsKey
std::tuple< Int_t, Int_t, Int_t > ME3IdsKey
Definition: GEMValidationUtils.h:19
crabWrapper.key
key
Definition: crabWrapper.py:19