CMS 3D CMS Logo

Functions | Variables
das-up-to-nevents Namespace Reference

Functions

def das_do_command (cmd)
 
def das_file_data (dataset, opt="")
 
def das_file_site (dataset, site)
 
def das_lumi_data (dataset, opt="")
 
def das_run_data (dataset, opt="")
 
def das_run_events_data (dataset, run, opt="")
 
def get_url_clean (url)
 
def no_intersection ()
 

Variables

 action
 
 args
 
 base_cert_path
 
 base_cert_url
 Helpers. More...
 
 best_json
 
 cert_path
 
 cert_type
 
 cert_url
 ... More...
 
 cut
 
 das_opt
 
 data_runs
 
 dataset
 
 default
 
 df
 
 df_r
 
 df_rs
 
 events
 
 files
 
 golden
 
 golden_data_runs
 
 golden_data_runs_tocheck
 
 golden_flat
 
 good_lumis
 
 help
 
 how
 
 int
 
 json_list
 if we have access to eos we get from there ... More...
 
 latest_json
 
 n_lumis
 
 None
 
 on
 
 opt
 
 outfile
 
 parser
 
 PD
 
 R
 
 required
 
 run_ranges
 
 site
 
 str
 
 sum_events
 
 testing
 Check if we are in the cms-bot "environment". More...
 
 threshold
 
 type
 
 web_fallback
 
 year
 get the greatest golden json More...
 

Function Documentation

◆ das_do_command()

def das-up-to-nevents.das_do_command (   cmd)

Definition at line 30 of file das-up-to-nevents.py.

References edm.decode().

Referenced by das_file_data(), das_file_site(), das_lumi_data(), das_run_data(), and das_run_events_data().

30 def das_do_command(cmd):
31  out = subprocess.check_output(cmd, shell=True, executable="/bin/bash").decode('utf8')
32  return out.split("\n")
33 
bool decode(bool &, std::string_view)
Definition: types.cc:72

◆ das_file_data()

def das-up-to-nevents.das_file_data (   dataset,
  opt = "" 
)

Definition at line 41 of file das-up-to-nevents.py.

References das_do_command().

41 def das_file_data(dataset,opt=""):
42  cmd = "dasgoclient --query='file dataset=%s %s| grep file.name, file.nevents'"%(dataset,opt)
43  out = das_do_command(cmd)
44  out = [np.array(r.split(" "))[[0,3]] for r in out if len(r) > 0]
45 
46  df = pd.DataFrame(out,columns=["file","events"])
47  df.events = df.events.values.astype(int)
48 
49  return df
50 
def das_file_data(dataset, opt="")

◆ das_file_site()

def das-up-to-nevents.das_file_site (   dataset,
  site 
)

Definition at line 34 of file das-up-to-nevents.py.

References das_do_command().

34 def das_file_site(dataset, site):
35  cmd = "dasgoclient --query='file dataset=%s site=%s'"%(dataset,site)
36  out = das_do_command(cmd)
37  df = pd.DataFrame(out,columns=["file"])
38 
39  return df
40 
def das_file_site(dataset, site)

◆ das_lumi_data()

def das-up-to-nevents.das_lumi_data (   dataset,
  opt = "" 
)

Definition at line 51 of file das-up-to-nevents.py.

References das_do_command().

51 def das_lumi_data(dataset,opt=""):
52  cmd = "dasgoclient --query='file,lumi,run dataset=%s %s'"%(dataset,opt)
53 
54  out = das_do_command(cmd)
55  out = [r.split(" ") for r in out if len(r)>0]
56 
57  df = pd.DataFrame(out,columns=["file","run","lumis"])
58 
59  return df
60 
def das_lumi_data(dataset, opt="")

◆ das_run_data()

def das-up-to-nevents.das_run_data (   dataset,
  opt = "" 
)

Definition at line 70 of file das-up-to-nevents.py.

References das_do_command().

70 def das_run_data(dataset,opt=""):
71  cmd = "dasgoclient --query='run dataset=%s %s '"%(dataset,opt)
72  out = das_do_command(cmd)
73 
74  return out
75 
def das_run_data(dataset, opt="")

◆ das_run_events_data()

def das-up-to-nevents.das_run_events_data (   dataset,
  run,
  opt = "" 
)

Definition at line 61 of file das-up-to-nevents.py.

References das_do_command(), and int.

61 def das_run_events_data(dataset,run,opt=""):
62  cmd = "dasgoclient --query='file dataset=%s run=%s %s | sum(file.nevents) '"%(dataset,run,opt)
63  out = das_do_command(cmd)[0]
64 
65  out = [o for o in out.split(" ") if "sum" not in o]
66  out = int([r.split(" ") for r in out if len(r)>0][0][0])
67 
68  return out
69 
def das_run_events_data(dataset, run, opt="")

◆ get_url_clean()

def das-up-to-nevents.get_url_clean (   url)

Definition at line 19 of file das-up-to-nevents.py.

19 def get_url_clean(url):
20 
21  buffer = BytesIO()
22  c = pycurl.Curl()
23  c.setopt(c.URL, url)
24  c.setopt(c.WRITEDATA, buffer)
25  c.perform()
26  c.close()
27 
28  return BeautifulSoup(buffer.getvalue(), "lxml").text
29 

◆ no_intersection()

def das-up-to-nevents.no_intersection ( )

Definition at line 76 of file das-up-to-nevents.py.

References print().

76 def no_intersection():
77  print("No intersection between:")
78  print(" - json : ", best_json)
79  print(" - dataset: ", dataset)
80  print("Exiting.")
81  sys.exit(1)
82 
void print(TMatrixD &m, const char *label=nullptr, bool mathematicaFormat=false)
Definition: Utilities.cc:47

Variable Documentation

◆ action

das-up-to-nevents.action

Definition at line 90 of file das-up-to-nevents.py.

◆ args

das-up-to-nevents.args

Definition at line 94 of file das-up-to-nevents.py.

◆ base_cert_path

das-up-to-nevents.base_cert_path

Definition at line 17 of file das-up-to-nevents.py.

◆ base_cert_url

das-up-to-nevents.base_cert_url

Helpers.

Definition at line 16 of file das-up-to-nevents.py.

◆ best_json

das-up-to-nevents.best_json

Definition at line 144 of file das-up-to-nevents.py.

◆ cert_path

das-up-to-nevents.cert_path

Definition at line 121 of file das-up-to-nevents.py.

◆ cert_type

das-up-to-nevents.cert_type

Definition at line 113 of file das-up-to-nevents.py.

◆ cert_url

das-up-to-nevents.cert_url

...

if not we go to the website

Definition at line 135 of file das-up-to-nevents.py.

◆ cut

das-up-to-nevents.cut

Definition at line 193 of file das-up-to-nevents.py.

◆ das_opt

das-up-to-nevents.das_opt

Definition at line 170 of file das-up-to-nevents.py.

◆ data_runs

das-up-to-nevents.data_runs

Definition at line 162 of file das-up-to-nevents.py.

◆ dataset

das-up-to-nevents.dataset

Definition at line 104 of file das-up-to-nevents.py.

◆ default

das-up-to-nevents.default

Definition at line 86 of file das-up-to-nevents.py.

◆ df

das-up-to-nevents.df

Definition at line 188 of file das-up-to-nevents.py.

Referenced by CastorNominalCoder.adc2fC(), HcalNominalCoder.adc2fC(), CastorCoderDb.adc2fC(), HcalCoderDb.adc2fC(), CastorCoderDb.adc2fC_(), HcalCoderDb.adc2fC_(), HcaluLUTTPGCoder.adc2Linear(), ESElectronicsSim.analogToDigital(), EcalElectronicsSim< CoderType, SamplesType, DataFrameType >.analogToDigital(), ESElectronicsSimFast.analogToDigital(), EcalLiteDTUCoder.analogToDigital(), EcalCoder.analogToDigital(), HGCalBHValidation.analyze(), EcalABAnalyzer.analyze(), EcalTPGAnalyzer.analyze(), EcalPerEvtLaserAnalyzer.analyze(), EcalTestPulseAnalyzer.analyze(), testChannel.analyze(), EcalPulseShapeGrapher.analyze(), EcalLaserAnalyzer.analyze(), EcalLaserAnalyzer2.analyze(), EcnaAnalyzer.analyze(), HGCalDDDConstants.cellEtaPhiTrap(), CastorDataFrameFilter_impl.check(), HcalDataFrameFilter_impl.check(), HcalDataFrameFilter_impl.check< QIE10DataFrame >(), HcalDataFrameFilter_impl.check< QIE11DataFrame >(), GaussianSumUtilities1D.d2LnPdf(), ESElectronicsSim.digitalToAnalog(), EcalLiteDTUCoder.encode(), EcalCoder.encode(), CastorDataFrameFilter_impl.energySum(), HcalDataFrameFilter_impl.energySum(), HcalDataFrameFilter_impl.energySum< QIE11DataFrame >(), ESDataFrame.ESDataFrame(), OptOSensor2D.fastTraversesLightRay(), CastorNominalCoder.fC2adc(), HcalNominalCoder.fC2adc(), CastorCoderDb.fC2adc(), HcalCoderDb.fC2adc(), CastorCoderDb.fC2adc_(), HcalCoderDb.fC2adc_(), reco::HcalNoiseInfoProducer.filldigis(), HcalDataFrameFilter.filter(), LagrangeParentParticleFitter.fit(), ESDigitizerTraits.fix(), MuonSeedBuilder.foundMatchingSegment(), ConvBremSeedProducer.GoodCluster(), HcaluLUTTPGCoder.group0FGbits(), MuonSeedCleaner.GroupSeeds(), MuonSeedBuilder.IdentifyShowering(), HcaluLUTTPGCoder.lookupMSB(), SiStripConfigDb.partitions(), CastorNominalCoderTemplate.process(), HcalNominalCoderTemplate.process(), EcalEBFenixLinearizer.process(), EcalFenixLinearizer.process(), EcalEBPhase2Linearizer.process(), EcalFenixStrip.process_part1(), ESDigiToRaw.produce(), EcalDigiSelector.produce(), EcalDigiDisplay.readEBDigis(), EcalDigiDisplay.readEEDigis(), EcalTrigPrimFunctionalAlgo.run_part2(), SiStripConfigDb.runs(), StraightTrackAlignment.saveDiagnostics(), EcalMipGraphs.selectDigi(), EcalDisplaysByEvent.selectDigi(), XHistogram.splitSegment(), DD4hep_XHistogram.splitSegment(), HcalZeroSuppressionAlgo.suppress(), CSCSegtoRPC.thePoints(), DCCTowerBlock.unpackXtalData(), DCCSCBlock.unpackXtalData(), SiStripPartition.update(), CommissioningHistosUsingDb.uploadAnalyses(), and ESUnpacker.word2digi().

◆ df_r

das-up-to-nevents.df_r

Definition at line 197 of file das-up-to-nevents.py.

◆ df_rs

das-up-to-nevents.df_rs

Definition at line 191 of file das-up-to-nevents.py.

◆ events

das-up-to-nevents.events

Definition at line 105 of file das-up-to-nevents.py.

◆ files

das-up-to-nevents.files

Definition at line 226 of file das-up-to-nevents.py.

◆ golden

das-up-to-nevents.golden

Definition at line 147 of file das-up-to-nevents.py.

◆ golden_data_runs

das-up-to-nevents.golden_data_runs

Definition at line 163 of file das-up-to-nevents.py.

◆ golden_data_runs_tocheck

das-up-to-nevents.golden_data_runs_tocheck

Definition at line 169 of file das-up-to-nevents.py.

◆ golden_flat

das-up-to-nevents.golden_flat

Definition at line 153 of file das-up-to-nevents.py.

◆ good_lumis

das-up-to-nevents.good_lumis

Definition at line 203 of file das-up-to-nevents.py.

◆ help

das-up-to-nevents.help

Definition at line 86 of file das-up-to-nevents.py.

◆ how

das-up-to-nevents.how

Definition at line 188 of file das-up-to-nevents.py.

◆ int

das-up-to-nevents.int

Definition at line 87 of file das-up-to-nevents.py.

Referenced by das_run_events_data().

◆ json_list

das-up-to-nevents.json_list

if we have access to eos we get from there ...

Definition at line 126 of file das-up-to-nevents.py.

Referenced by querying.factory.object().

◆ latest_json

das-up-to-nevents.latest_json

Definition at line 143 of file das-up-to-nevents.py.

◆ n_lumis

das-up-to-nevents.n_lumis

Definition at line 204 of file das-up-to-nevents.py.

◆ None

das-up-to-nevents.None

Definition at line 86 of file das-up-to-nevents.py.

◆ on

das-up-to-nevents.on

◆ opt

das-up-to-nevents.opt

◆ outfile

das-up-to-nevents.outfile

◆ parser

das-up-to-nevents.parser

Definition at line 85 of file das-up-to-nevents.py.

◆ PD

das-up-to-nevents.PD

Definition at line 112 of file das-up-to-nevents.py.

Referenced by HLTScalers.dqmBeginRun().

◆ R

das-up-to-nevents.R

Definition at line 155 of file das-up-to-nevents.py.

◆ required

das-up-to-nevents.required

Definition at line 86 of file das-up-to-nevents.py.

◆ run_ranges

das-up-to-nevents.run_ranges

Definition at line 142 of file das-up-to-nevents.py.

◆ site

das-up-to-nevents.site

◆ str

das-up-to-nevents.str

Definition at line 86 of file das-up-to-nevents.py.

◆ sum_events

das-up-to-nevents.sum_events

Definition at line 178 of file das-up-to-nevents.py.

◆ testing

das-up-to-nevents.testing

Check if we are in the cms-bot "environment".

Definition at line 103 of file das-up-to-nevents.py.

◆ threshold

das-up-to-nevents.threshold

Definition at line 106 of file das-up-to-nevents.py.

◆ type

das-up-to-nevents.type

Definition at line 86 of file das-up-to-nevents.py.

◆ web_fallback

das-up-to-nevents.web_fallback

Definition at line 122 of file das-up-to-nevents.py.

◆ year

das-up-to-nevents.year