Skip to content

Instantly share code, notes, and snippets.

View mazurov's full-sized avatar

Alexander Mazurov mazurov

View GitHub Profile
@mazurov
mazurov / pushZip.sh
Created November 3, 2014 10:03
Push result to database
export PYTHONPATH=/afs/cern.ch/lhcb/software/webapps/LHCbPRTest/Django-1.3.5:/afs/cern.ch/sw/lcg/external/pytools/1.8_python2.7/x86_64-slc6-gcc48-opt/lib/python2.7/site-packages
./django_apps/manage.py pushZip ~/xxx.zip
@mazurov
mazurov / bootstrap.sh
Last active August 29, 2015 14:08
TriggerTower dumper based on C++ algorithm
wget -nv -O- https://gist.githubusercontent.com/mazurov/b5480eeebe6c609488f0/raw/setup.sh | source /dev/stdin
@mazurov
mazurov / reo.sh
Created October 24, 2014 07:40
Hanno Reco_tf
Reco_tf.py --inputBSFile /afs/cern.ch/work/h/hmeyerzt/public/data/data12_8TeV.00200804.physics_L1Calo.merge.RAW._lb0154._SFO-3._0001.1 --outputESDFile myESD.pool.root --outputAODFile myAOD.pool.root --outputHISTFile myHIST.root --autoConfiguration 'everything' --maxEvents 2 --ignoreErrors True | tee -a output.txt
@mazurov
mazurov / jobo.py
Last active August 29, 2015 14:07
How to test new PpmByteStreamDecoder. Run command from setup.sh file in your lxplus console (ATLAS environment should be set before)
from ByteStreamCnvSvc import ReadByteStream
import struct
# InputFile = "data14_calib.00236011.calibration_L1CaloEnergyScan.daq.RAW._lb0000._SFO-1._0001.data"
# InputFile = "data_test.1412246305.calibration_.daq.RAW._lb0000._ROS-00._0001.data"
# BsFolder = "/afs/cern.ch/user/l/l1ccalib/w0/am"
#InputFile = "data_test.1412873836.calibration_.daq.RAW._lb0000._ROS-00._0001.data"
InputFile = "data_test.1412873981.calibration_.daq.RAW._lb0000._ROS-00._0001.data"
#InputFile = "data_test.1412875644.calibration_.daq.RAW._lb0000._ROS-00._0001.data"
@mazurov
mazurov / setup.sh
Created October 2, 2014 11:07
ATLAS online environment
# https://indico.cern.ch/event/329657/session/5/contribution/28/material/slides/0.pdf
myL1CaloVersion=nightly
source /afs/cern.ch/atlas/project/tdaq/level1/calo/rel/l1calo/nightly/scripts/login/.lxplus_bashrc
dumpl1calo -RSd filename | less
evl1.sh
@mazurov
mazurov / base_conversion_5_7.py
Created September 18, 2014 18:00
5.7 Base conversion
# 5.7 Base conversion
def base10(s, b):
res = 0;
for c in s:
res = res * b + (ord(c)-ord('0') if ord(c) <= ord('9') else 10 + ord(c) - ord('A'))
return res
x = base10('AA',16)
@mazurov
mazurov / cpmtowers.sh
Last active August 29, 2015 14:06
How to get information from CPM towers
# Setup environment and recompile TrigT1CaloEvent from the SVN (soon it will be in nigthly build and you can skip the recompilation) phase
$> cd /some/directory
$> asetup 19.1.3,here
# You don't need the following four commands if you already have compiled it before
$> cmt -r trunk $SVNROOT/Trigger/TrigT1/TrigT1CaloEvent
$> cd TrigT1CaloEvent/cmt
$> cmt config
$> cmt make
@mazurov
mazurov / guake.py
Created September 13, 2014 14:07
Open guake on the right monitor
def get_final_window_rect(self):
"""Gets the final size of the main window of guake. The height
is the window_height property, width is window_width and the
horizontal alignment is given by window_alignment.
"""
screen = self.window.get_screen()
height = self.client.get_int(KEY('/general/window_height'))
width = 100
halignment = self.client.get_int(KEY('/general/window_halignment'))
@mazurov
mazurov / atlas.sh
Created July 7, 2014 16:23
ATLAS useful commands
export ATLAS_LOCAL_ROOT_BASE=/cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase
source /cvmfs/atlas.cern.ch/repo/ATLASLocalRootBase/user/atlasLocalSetup.sh
cmt co -r TrigT1CaloCAF-00-02-02 $SVNROOT/Trigger/TrigT1/TrigT1CaloCAF
asetup 17.2.8.7,32,slc5,here
@mazurov
mazurov / nightless.sh
Created January 20, 2014 15:16
How to setup developer environment at LHCb
. LbLogin.sh -c x86_64-slc6-clang33-opt
SetupProject --build-env --nightly lhcb-lcg-head Mon LHCb HEAD
getpack --no-config Phys/LoKiCore head
make
####